/**
 * WooCommerce Custom Styles for Opanije Theme
 * Modern design with gradients and layered shadows
 * Enhanced UI/UX with accessibility features
 * Performance optimized with hardware acceleration
 *
 * =============================================================================
 * IMPLEMENTATION NOTES - Advanced Features Requiring Additional Code
 * =============================================================================
 *
 * The following CSS classes are "future-ready" styles that provide a complete
 * design foundation for enhanced WooCommerce features. These require either
 * JavaScript implementation or WordPress/WooCommerce plugin integration to
 * become fully functional:
 *
 * 1. QUANTITY CONTROLS (.quantity-button)
 *    Location: Lines ~1809-1843
 *    Description: Custom +/- circular buttons for quantity selection
 *    Implementation Required:
 *      - JavaScript to handle increment/decrement functionality
 *      - Update WooCommerce quantity input on button click
 *      - Handle min/max quantity validation
 *    Benefit: Better UX than default number input, especially on mobile
 *
 * 2. STICKY ADD-TO-CART BAR (.sticky-add-to-cart)
 *    Location: Lines ~2015-2105
 *    Description: Fixed bottom bar on mobile with quick add-to-cart
 *    Implementation Required:
 *      - JavaScript to detect scroll position
 *      - Toggle .visible class when user scrolls past product
 *      - Populate with product thumbnail, title, price dynamically
 *    Benefit: Improves conversion by keeping CTA always accessible
 *
 * 3. WISHLIST/FAVORITE BUTTON (.product-wishlist-button)
 *    Location: Lines ~1884-1923
 *    Description: Heart icon button for adding products to wishlist
 *    Implementation Required:
 *      - WooCommerce wishlist plugin (e.g., YITH Wishlist, WooCommerce Wishlists)
 *      - OR custom JavaScript with localStorage/database integration
 *      - Toggle .active class on click
 *    Benefit: User engagement and return visits
 *
 * 4. SOCIAL SHARE BUTTONS (.product-share)
 *    Location: Lines ~2107-2183
 *    Description: Facebook, Twitter, Pinterest, WhatsApp share buttons
 *    Implementation Required:
 *      - JavaScript to handle share link generation
 *      - Social sharing plugin OR custom implementation
 *      - Pass product URL, title, image to social networks
 *    Benefit: Organic marketing and increased reach
 *
 * 5. PRODUCT RATING STARS (.star-rating)
 *    Location: Lines ~1845-1883
 *    Description: Visual star rating display with half-star support
 *    Implementation Required:
 *      - May work with default WooCommerce if reviews enabled
 *      - Custom classes (.star.filled, .star.half) require JavaScript
 *      - Convert WooCommerce rating to star display
 *    Benefit: Social proof and trust signals
 *
 * 6. STOCK INDICATORS (.stock)
 *    Location: Lines ~1765-1799
 *    Description: Visual badges for in-stock, out-of-stock, low-stock
 *    Implementation Required:
 *      - Likely works with default WooCommerce stock management
 *      - Verify classes match WooCommerce output
 *      - May need template customization in PHP
 *    Benefit: Clear inventory status for users
 *
 * RECOMMENDATION: Implement features incrementally based on priority:
 *   Priority 1: Stock indicators (likely already functional)
 *   Priority 2: Sticky add-to-cart (highest conversion impact)
 *   Priority 3: Quantity controls (better UX)
 *   Priority 4: Social sharing (marketing benefit)
 *   Priority 5: Wishlist (requires plugin or significant custom dev)
 *
 * TESTING: After implementing any feature, test with:
 *   - Multiple browsers (Chrome, Firefox, Safari, Edge)
 *   - Mobile devices (iOS Safari, Android Chrome)
 *   - Screen readers (NVDA, VoiceOver) for accessibility
 *   - Various WooCommerce product types (simple, variable, grouped)
 */

/* CSS Custom Properties */
:root {
    --hero-mobile-padding: 40px 0 50px;
    --hero-brand-frame-mobile-padding: 25px 20px;
    --primary-gold: #d8a81b;
    --primary-dark: #2B2823;
    --accent-gold: #b7780d;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

    /* Product card shadows */
    --shadow-product-card: 0 10px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-product-card-hover: 0 16px 50px rgba(0,0,0,0.15), 0 8px 20px rgba(0,0,0,0.1);

    /* Gradient backgrounds */
    --gradient-product-bg: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    --gradient-gold: linear-gradient(135deg, #d8a81b 0%, #b7780d 100%);
    --gradient-gold-dark: linear-gradient(135deg, #b7780d 0%, #9a6409 100%);
    --gradient-hero-overlay: linear-gradient(135deg, rgba(43, 40, 35, 0.50) 0%, rgba(26, 22, 20, 0.60) 100%);

    /* Button shadows */
    --shadow-button: 0 6px 20px rgba(216, 168, 27, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    --shadow-button-hover: 0 12px 35px rgba(216, 168, 27, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);

    /* Image shadows */
    --shadow-image: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
}

/* ==========================================================================
   Global WooCommerce Wrapper Styles
   ========================================================================== */

.woocommerce-wrapper {
    font-family: 'Lato', sans-serif;
    background: #ffffff;
    padding: 0;
    min-height: 70vh;
    scroll-behavior: smooth;
}

.woocommerce h1,
.woocommerce h2,
.woocommerce h3 {
    font-family: 'Montserrat', sans-serif;
    color: #2B2823;
    font-weight: 700;
}

.woocommerce p,
.woocommerce a {
    font-family: 'Lato', sans-serif;
    color: #2B2823;
}

/* Clean, minimal styling */
.woocommerce {
    background: #fff;
    border-radius: 4px;
    padding: 40px;
}

/* ==========================================================================
   Shop/Archive Page Styles
   ========================================================================== */

/* Hero Section - Impactful Design for Main Shop Page */
.shop-hero-section {
    position: relative;
    background: linear-gradient(135deg, #2B2823 0%, #1a1614 100%);
    padding: 50px 0 60px;
    margin-bottom: 60px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Solid fallback color in case background image fails to load */
    background-color: var(--primary-dark);
    background-image:
        var(--gradient-hero-overlay),
        var(--hero-bg-image, none);
    /* NOTE: Hero image should be optimized (WebP format, max 1920px width) for best performance */
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Better mobile scrolling performance */
    z-index: 0;
    /* Improve rendering performance */
    will-change: auto;
    transform: translateZ(0);
}

.hero-content-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Hero Brand Section (Left Column) */
.hero-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 350px;
}

.hero-brand-frame {
    position: relative;
    padding: 40px 35px;
    border: 3px solid rgba(216, 168, 27, 0.4);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(43, 40, 35, 0.75) 0%, rgba(26, 22, 20, 0.80) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Safari support */
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
    /* Improve text readability */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
    .hero-brand-frame {
        background: linear-gradient(135deg, rgba(43, 40, 35, 0.85) 0%, rgba(26, 22, 20, 0.90) 100%);
    }
}

.hero-brand-frame:hover {
    border-color: rgba(216, 168, 27, 0.6);
    transform: translateY(-5px);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(216, 168, 27, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-brand-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #d8a81b 0%, transparent 50%, #d8a81b 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.hero-brand-frame:hover::before {
    opacity: 0.3;
}

.hero-logo img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(216, 168, 27, 0.4));
    transition: transform 0.3s ease;
}

.hero-brand-frame:hover .hero-logo img {
    transform: scale(1.05);
}

.hero-brand-name {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #d8a81b;
    text-transform: uppercase;
    margin: 10px 0 0 0;
}

.hero-brand-tagline {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin: 0;
    font-style: italic;
}

.hero-brand-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #d8a81b 50%, transparent 100%);
    margin: 10px 0;
}

.hero-brand-trust {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.hero-brand-trust .trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.hero-brand-trust .trust-item i {
    color: #d8a81b;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.hero-text-content {
    max-width: 600px;
}

.hero-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(2.8rem, 5.5vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 30px 0;
    letter-spacing: -0.01em;
}

.hero-description {
    font-family: 'Lato', sans-serif;
    font-size: 1.2rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 40px 0;
    font-weight: 400;
}

.hero-features {
    display: flex;
    gap: 35px;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d8a81b;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-feature i {
    font-size: 1.6rem;
}

/* Hero Product Image (Right Column) */
.hero-product-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.hero-product-image:hover img {
    transform: rotate(0deg) scale(1.02);
}

/* Simple Header for Category/Search Pages */
.shop-header-simple {
    background: #ffffff;
    padding: 60px 0 40px;
    margin-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
}

.shop-header-simple h1 {
    font-family: 'Montserrat', sans-serif;
    color: #2B2823;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 15px 0;
    letter-spacing: -0.01em;
    text-align: left;
}

/* Product Grid - Clean Cards */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    transition: var(--transition-smooth);
    border: 1px solid #f0f0f0;
    text-align: center;
    list-style: none;
    position: relative;
    box-shadow: var(--shadow-sm);
    /* Improve performance */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #d8a81b;
}

.woocommerce ul.products li.product img {
    border-radius: 4px;
    margin-bottom: 16px;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.03);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2B2823;
    margin: 12px 0 8px;
    transition: color 0.3s ease;
}

.woocommerce ul.products li.product:hover .woocommerce-loop-product__title {
    color: #d8a81b;
}

.woocommerce ul.products li.product .price {
    color: #b7780d;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Add to Cart Button - Clean Style Matching Main Site */
.woocommerce ul.products li.product .button {
    background-color: #d8a81b;
    color: #2B2823 !important;
    border: 2px solid #d8a81b;
    border-radius: 50px;
    padding: 0.7rem 1.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.woocommerce ul.products li.product .button:hover {
    background-color: #b7780d;
    border-color: #b7780d;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(216, 168, 27, 0.3);
}

/* Ordering/Sorting */
.woocommerce-ordering select {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 16px;
    font-family: 'Lato', sans-serif;
    color: #2B2823;
    font-weight: 500;
}

/* Pagination */
.woocommerce nav.woocommerce-pagination {
    text-align: center;
    margin-top: 50px;
}

.woocommerce nav.woocommerce-pagination ul {
    border: none;
    display: inline-flex;
    gap: 8px;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: none;
    margin: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    background-color: #fff;
    color: #2B2823;
    border: 1px solid #e0e0e0;
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
    background-color: #d8a81b;
    color: #2B2823;
    border-color: #d8a81b;
}

/* ==========================================================================
   Single Product Page Styles - Modern UI/UX
   ========================================================================== */

/* Single Product Wrapper */
.single-product-wrapper {
    background: var(--gradient-product-bg);
    padding: 80px 0;
    min-height: 70vh;
}

.woocommerce div.product {
    background: #fff;
    padding: 60px;
    border-radius: 16px;
    box-shadow: var(--shadow-product-card);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: visible; /* Changed from hidden to prevent clipping of payment elements */
    /* Performance optimization */
    transform: translateZ(0);
    backface-visibility: hidden;
    /* Ensure proper stacking context */
    isolation: isolate;
}

/* Decorative corner accent */
.woocommerce div.product::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px; /* Large enough for subtle visual interest without dominating */
    height: 200px;
    background: linear-gradient(135deg, transparent 0%, rgba(216, 168, 27, 0.03) 100%);
    border-radius: 0 16px 0 100%; /* Curved bottom-left for organic shape */
    pointer-events: none;
}

.woocommerce div.product .product_title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    color: #2B2823;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: 20px;
}

/* Elegant underline accent */
.woocommerce div.product .product_title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px; /* Partial underline for modern accent effect */
    height: 4px; /* Thick enough to be visible but not overwhelming */
    background: linear-gradient(90deg, var(--primary-gold) 0%, transparent 100%);
    border-radius: 2px;
}

/* Product Meta Badges - Modern Design */
.woocommerce div.product .product_meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.woocommerce div.product .product_meta > span {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
    border: 1px solid #e8e8e8;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.woocommerce div.product .product_meta > span:hover {
    background: linear-gradient(135deg, rgba(216, 168, 27, 0.08) 0%, rgba(216, 168, 27, 0.12) 100%);
    border-color: rgba(216, 168, 27, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.woocommerce div.product .product_meta a {
    color: #d8a81b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.woocommerce div.product .product_meta a:hover {
    color: #b7780d;
}

.woocommerce div.product p.price {
    color: #b7780d;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 35px;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    position: relative;
}

/* Price highlight background */
.woocommerce div.product p.price::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--accent-gold) 0%, var(--primary-gold) 100%);
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(216, 168, 27, 0.3);
}

/* Trust Signals - Enhanced UI */
.product-trust-signals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: var(--shadow-sm);
}

.trust-signal {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2B2823;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 8px;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.trust-signal:hover {
    border-color: rgba(216, 168, 27, 0.2);
    transform: translateX(5px);
    box-shadow: -3px 0 0 var(--primary-gold);
}

.trust-signal i {
    color: #d8a81b;
    font-size: 1.4rem;
    min-width: 24px;
    text-align: center;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-family: 'Lato', sans-serif;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #444;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(to right, rgba(216, 168, 27, 0.03) 0%, transparent 100%);
    border-left: 5px solid #d8a81b;
    border-radius: 8px;
    position: relative;
    box-shadow: var(--shadow-sm);
    z-index: 1; /* Ensure description stays below payment elements */
    clear: both; /* Prevent float overlaps */
}

/* Quote-style icon */
.woocommerce div.product .woocommerce-product-details__short-description::before {
    content: '\201C';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 4rem;
    color: rgba(216, 168, 27, 0.15);
    font-family: Georgia, serif;
    line-height: 1;
    z-index: -1; /* Keep decorative element behind text and payment buttons */
}

/* Product Images - Enhanced */
.woocommerce div.product div.images {
    margin-bottom: 50px;
    position: relative;
}

.woocommerce div.product div.images img {
    border-radius: 16px;
    box-shadow: var(--shadow-image);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
}

.woocommerce div.product div.images .woocommerce-product-gallery__image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image:hover img {
    transform: scale(1.03);
    box-shadow: var(--shadow-product-card-hover);
}

/* Zoom indicator - requires Font Awesome 5 Free to be enqueued */
.woocommerce div.product div.images .woocommerce-product-gallery__image::after {
    content: '\f00e'; /* Font Awesome search-plus icon */
    font-family: 'Font Awesome 5 Free', sans-serif; /* Fallback to sans-serif if FA not loaded */
    font-weight: 900;
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Fallback for when Font Awesome is not available */
@supports not (font-family: 'Font Awesome 5 Free') {
    .woocommerce div.product div.images .woocommerce-product-gallery__image::after {
        content: '🔍'; /* Unicode magnifying glass as fallback */
        font-family: sans-serif;
    }
}

.woocommerce div.product div.images .woocommerce-product-gallery__image:hover::after {
    opacity: 1;
}

/* Image Gallery Improvements */
.woocommerce div.product .woocommerce-product-gallery {
    position: relative;
}

.woocommerce div.product .flex-control-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow-x: auto;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-gold) #e8e8e8;
}

.woocommerce div.product .flex-control-thumbs::-webkit-scrollbar {
    height: 6px;
}

.woocommerce div.product .flex-control-thumbs::-webkit-scrollbar-track {
    background: #e8e8e8;
    border-radius: 3px;
}

.woocommerce div.product .flex-control-thumbs::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 3px;
}

.woocommerce div.product .flex-control-thumbs li {
    flex: 0 0 auto;
    width: 90px;
    height: 90px;
    position: relative;
}

.woocommerce div.product .flex-control-thumbs li img {
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.woocommerce div.product .flex-control-thumbs li img:hover {
    border-color: rgba(216, 168, 27, 0.5);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(216, 168, 27, 0.25);
}

.woocommerce div.product .flex-control-thumbs li img.flex-active {
    border-color: #d8a81b;
    box-shadow: 0 6px 20px rgba(216, 168, 27, 0.4);
    transform: scale(1.05);
}

/* Add to Cart Form - Modern Design */
.woocommerce div.product form.cart {
    margin-bottom: 40px;
    padding: 35px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    border: 2px solid #e0e0e0;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: visible; /* Changed from hidden to allow payment buttons to display properly */
    z-index: 5; /* Establish stacking context for child elements */
}

/* Subtle accent gradient */
.woocommerce div.product form.cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-gold) 0%, var(--primary-gold) 50%, var(--accent-gold) 100%);
}

.woocommerce div.product form.cart .quantity {
    margin-right: 15px;
    display: inline-block;
}

.woocommerce div.product form.cart .quantity input {
    border: 2px solid #d0d0d0;
    border-radius: 12px;
    padding: 16px 24px;
    width: 100px;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.woocommerce div.product form.cart .quantity input:hover {
    border-color: rgba(216, 168, 27, 0.5);
}

.woocommerce div.product form.cart .quantity input:focus {
    border-color: #d8a81b;
    outline: none;
    box-shadow:
        0 0 0 4px rgba(216, 168, 27, 0.15),
        inset 0 2px 4px rgba(0,0,0,0.05);
    transform: scale(1.02);
}

.woocommerce div.product form.cart .single_add_to_cart_button {
    background: var(--gradient-gold);
    color: #2B2823 !important;
    border: none;
    border-radius: 12px;
    padding: 1.2rem 3rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: var(--shadow-button);
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on hover */
.woocommerce div.product form.cart .single_add_to_cart_button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover::before {
    left: 100%;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
    background: var(--gradient-gold-dark);
    color: #ffffff !important;
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-button-hover);
}

.woocommerce div.product form.cart .single_add_to_cart_button:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 6px 20px rgba(216, 168, 27, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Loading state */
.woocommerce div.product form.cart .single_add_to_cart_button.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* WooCommerce Payment Buttons - Fix for Direct Payment Overlap */
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart,
.woocommerce div.product form.cart .wc-payment-buttons,
.woocommerce div.product form.cart .payment_buttons {
    position: relative;
    z-index: 10; /* Ensure payment buttons appear above all other elements */
    clear: both; /* Clear any floats */
    margin-top: 20px;
}

.woocommerce div.product .woocommerce-payment-buttons,
.woocommerce div.product .wc-stripe-payment-request-button-wrapper,
.woocommerce div.product .gpay-button-container,
.woocommerce div.product .apple-pay-button {
    position: relative;
    z-index: 10;
    margin: 20px 0;
    clear: both;
}

/* Ensure payment button separators are visible */
.woocommerce div.product .woocommerce-payment-buttons__separator {
    margin: 15px 0;
    position: relative;
    z-index: 10;
}

/* PayPal Payment Buttons - Fix for button container positioning */
.woocommerce div.product form.cart .wc-ppcp-funding-source-wrapper,
.woocommerce div.product form.cart .woocommerce-paypal-payments-wrapper,
.woocommerce div.product form.cart div[id*="paypal"]:not(iframe),
.woocommerce div.product form.cart div[class*="paypal"] {
    position: relative;
    z-index: 10;
    clear: both;
    margin: 20px 0;
    width: 100%;
    display: block;
}

/* Ensure PayPal button container displays correctly and contains iframes properly */
.woocommerce div.product form.cart .wc-ppcp-funding-source-wrapper > div,
.woocommerce div.product form.cart .woocommerce-paypal-payments-wrapper > div,
.woocommerce div.product form.cart div[id*="paypal"] > div {
    position: relative !important;
    width: 100% !important;
    overflow: visible !important;
    min-height: 0 !important;
}

/* Fix PayPal iframe positioning - Critical fix for __zoid__paypal_buttons_ iframe */
.woocommerce div.product form.cart iframe[id*="paypal"],
.woocommerce div.product form.cart iframe[name*="paypal"],
.woocommerce div.product form.cart iframe[name*="zoid"] {
    position: static !important;
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    overflow: visible !important;
}

/* PayPal message and pay later styling - Consolidated from duplicate selectors */
.woocommerce div.product form.cart .ppcp-messages,
.woocommerce div.product form.cart .wc-ppcp-pay-later-message {
    position: relative;
    z-index: 10;
    clear: both;
    margin: 20px 0;
    display: block;
    width: 100%;
}

/* Ensure specific payment-related divs maintain proper flow without affecting quantity/variation selectors */
.woocommerce div.product form.cart > div.wc-ppcp-funding-source-wrapper,
.woocommerce div.product form.cart > div.woocommerce-paypal-payments-wrapper,
.woocommerce div.product form.cart > div[id*="paypal"],
.woocommerce div.product form.cart > div[class*="paypal"],
.woocommerce div.product form.cart > div.wc-payment-buttons,
.woocommerce div.product form.cart > div.payment_buttons {
    position: relative;
    display: block;
    width: 100%;
}

/* Product Tabs - Enhanced Design */
.woocommerce div.product .woocommerce-tabs {
    margin-top: 70px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow:
        0 4px 20px rgba(0,0,0,0.08),
        0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid #e8e8e8;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    border-bottom: none;
    padding: 0;
    margin-bottom: 40px;
    display: flex;
    gap: 15px;
    background: #f0f0f0;
    border-radius: 12px;
    padding: 8px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    border: none;
    background: none;
    margin: 0;
    flex: 1;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    font-family: 'Montserrat', sans-serif;
    color: #666;
    font-weight: 700;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    text-align: center;
    background: transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    color: #d8a81b;
    background: rgba(216, 168, 27, 0.1);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: #2B2823;
    background: #ffffff;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.08),
        0 2px 4px rgba(0,0,0,0.04);
}

.woocommerce div.product .woocommerce-tabs .panel {
    padding: 35px 0;
    color: #555;
    line-height: 1.9;
    font-size: 1.05rem;
}

.woocommerce div.product .woocommerce-tabs .panel h2 {
    font-family: 'Montserrat', sans-serif;
    color: #2B2823;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Related Products */
.related.products {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 3px solid #f0f0f0;
}

.related.products h2 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2.5rem;
    color: #2B2823;
    margin-bottom: 50px;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.related.products h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #d8a81b;
    border-radius: 2px;
}

/* No featured products message */
.no-featured-products {
    text-align: center;
    padding: 60px 40px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    font-style: italic;
    border: 2px dashed #d8d8d8;
}

/* ==========================================================================
   Featured Products Section
   ========================================================================== */

.featured-products-section {
    background: #f8f9fa;
    padding: 80px 0;
    margin-bottom: 60px;
}

.section-header {
    text-align: left;
    margin-bottom: 50px;
    position: relative;
    padding-left: 20px;
}

.section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 40px;
    background: #d8a81b;
    border-radius: 2px;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #2B2823;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
    text-align: left;
}

.section-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 1.05rem;
    color: #666;
    margin: 0;
    font-style: italic;
    text-align: left;
}

.featured-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-product-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.featured-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #d8a81b;
}

.featured-product-image {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

.featured-product-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    display: block;
}

.featured-product-card:hover .featured-product-image img {
    transform: scale(1.05);
}

.featured-product-info {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.featured-product-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 15px;
}

.featured-product-info h3 a {
    color: #2B2823;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-product-info h3 a:hover {
    color: #d8a81b;
}

.featured-price {
    color: #b7780d;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

.featured-product-button {
    background-color: #d8a81b;
    color: #2B2823 !important;
    border: 2px solid #d8a81b;
    border-radius: 50px;
    padding: 0.8rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    margin-top: auto;
}

.featured-product-button:hover {
    background-color: #b7780d;
    border-color: #b7780d;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(216, 168, 27, 0.3);
}

/* ==========================================================================
   Cart Page Header Enhancement
   ========================================================================== */

.cart-page-header {
    background: linear-gradient(135deg, #2B2823 0%, #3d3834 100%);
    padding: 40px 0 50px;
    margin-bottom: 50px;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cart-header-content {
    max-width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
}

.cart-logo {
    flex-shrink: 0;
}

.cart-logo img {
    width: 80px; /* Fixed size for consistent cart header layout */
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.1));
}

.cart-header-text {
    text-align: center;
}

.cart-header-text h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.cart-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-style: italic;
}

/* Cart Breadcrumbs */
.cart-breadcrumbs {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.breadcrumb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.breadcrumb-item.active {
    opacity: 1;
}

.breadcrumb-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.breadcrumb-item.active .breadcrumb-number {
    background: #d8a81b;
    border-color: #d8a81b;
    color: #2B2823;
}

.breadcrumb-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.breadcrumb-divider {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin-top: -25px;
}

/* ==========================================================================
   Cart & Checkout Page Styles
   ========================================================================== */

/* Cart & Camp Info Styles */
.camp-info-row td {
    background: #fff9e6;
}

.camp-info-row h4 {
    font-family: 'Montserrat', sans-serif;
}

.woocommerce-cart-form__cart-item .wc-item-meta {
    font-size: 0.9rem;
}

.woocommerce-cart-form__cart-item .wc-item-meta strong {
    color: #d8a81b;
}

/* Cart Page - Minimalist Style with Branding */
.woocommerce-cart {
    background-color: #ffffff;
    padding: 60px 0;
}

/* Cart page header */
.woocommerce-cart-form::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #d8a81b;
    margin: 0 auto 30px;
}

.woocommerce-cart h1,
.woocommerce-cart .cart-empty {
    text-align: center;
    color: #2B2823;
    font-weight: 700;
    margin-bottom: 40px;
}

.woocommerce table.shop_table {
    border-radius: 8px;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.woocommerce table.shop_table th {
    background-color: #2B2823;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    padding: 20px;
    border: none;
}

.woocommerce table.shop_table td {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce table.shop_table .product-thumbnail img {
    border-radius: 8px;
}

.woocommerce table.shop_table .product-name a {
    font-family: 'Montserrat', sans-serif;
    color: #2B2823;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.woocommerce table.shop_table .product-name a:hover {
    color: #d8a81b;
}

.woocommerce table.shop_table .product-price,
.woocommerce table.shop_table .product-subtotal {
    color: #b7780d;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Quantity Input */
.woocommerce .quantity input {
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 15px;
    width: 70px;
    text-align: center;
}

/* Update Cart Button */
.woocommerce button[name="update_cart"] {
    background-color: #2B2823 !important;
    color: #fff !important;
    border: 2px solid #2B2823 !important;
    border-radius: 50px !important;
    padding: 0.7rem 1.8rem !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

.woocommerce button[name="update_cart"]:hover {
    background-color: #d8a81b !important;
    border-color: #d8a81b !important;
    color: #2B2823 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(216, 168, 27, 0.3) !important;
}

/* Cart Totals */
.cart-collaterals {
    background: #F7F7F7;
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
}

.cart-collaterals h2 {
    font-family: 'Montserrat', sans-serif;
    color: #2B2823;
    font-weight: 700;
    margin-bottom: 25px;
}

.cart-collaterals .shop_table {
    background: #fff;
    border-radius: 8px;
}

.cart-collaterals .order-total th,
.cart-collaterals .order-total td {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #b7780d;
}

/* Proceed to Checkout Button */
.woocommerce .wc-proceed-to-checkout a.checkout-button {
    background-color: #d8a81b;
    color: #2B2823 !important;
    border: 2px solid #d8a81b;
    border-radius: 50px;
    padding: 0.7rem 1.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    display: block;
    transition: all 0.3s ease;
    text-decoration: none;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #b7780d;
    border-color: #b7780d;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(216, 168, 27, 0.3);
}

/* Checkout Page Styling */
.woocommerce-checkout {
    background-color: #ffffff;
    padding: 60px 0;
}

.woocommerce-checkout h3 {
    font-family: 'Montserrat', sans-serif;
    color: #2B2823;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.woocommerce-checkout .woocommerce-billing-fields h3::before,
.woocommerce-checkout .woocommerce-additional-fields h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: #d8a81b;
    margin-right: 10px;
    vertical-align: middle;
}

.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea,
.woocommerce-checkout select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    font-family: 'Lato', sans-serif;
    transition: border-color 0.3s ease;
}

.woocommerce-checkout input[type="text"]:focus,
.woocommerce-checkout input[type="email"]:focus,
.woocommerce-checkout input[type="tel"]:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus {
    border-color: #d8a81b;
    outline: none;
}

.woocommerce-checkout button[type="submit"],
.woocommerce-checkout #place_order {
    background-color: #d8a81b;
    color: #2B2823 !important;
    border: 2px solid #d8a81b;
    border-radius: 50px;
    padding: 0.7rem 1.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.woocommerce-checkout button[type="submit"]:hover,
.woocommerce-checkout #place_order:hover {
    background-color: #b7780d;
    border-color: #b7780d;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(216, 168, 27, 0.3);
}

/* ==========================================================================
   View Cart Button & Widget Cart Styling
   ========================================================================== */

/* "View Cart" button that appears after adding to cart */
.woocommerce a.added_to_cart {
    background-color: #2B2823;
    color: #ffffff !important;
    border: 2px solid #2B2823;
    border-radius: 50px;
    padding: 0.7rem 1.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.woocommerce a.added_to_cart:hover {
    background-color: #d8a81b;
    border-color: #d8a81b;
    color: #2B2823 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(216, 168, 27, 0.3);
}

/* Mini cart widget styling */
.widget_shopping_cart {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.widget_shopping_cart .cart_list li {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget_shopping_cart .buttons a {
    background-color: #d8a81b !important;
    color: #2B2823 !important;
    border: 2px solid #d8a81b !important;
    border-radius: 50px !important;
    padding: 0.7rem 1.8rem !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    text-align: center !important;
    display: block !important;
    margin: 10px 0 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.widget_shopping_cart .buttons a:hover {
    background-color: #b7780d !important;
    border-color: #b7780d !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(216, 168, 27, 0.3);
}

/* Cart page branding */
.woocommerce-cart .woocommerce::before {
    content: 'OPANIJE';
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #d8a81b;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 10px;
    opacity: 0.7;
}

/* Checkout page branding */
.woocommerce-checkout .woocommerce::before {
    content: 'OPANIJE';
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #d8a81b;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 10px;
    opacity: 0.7;
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */

/* Comprehensive focus states for keyboard navigation and accessibility */
.woocommerce ul.products li.product:focus-within,
.woocommerce .button:focus,
.woocommerce ul.products li.product .button:focus {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
}

.woocommerce ul.products li.product a:focus {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Enhanced focus states for form elements */
.woocommerce div.product form.cart .single_add_to_cart_button:focus-visible,
.woocommerce .wc-proceed-to-checkout a.checkout-button:focus-visible,
.woocommerce button[name="update_cart"]:focus-visible,
.woocommerce-checkout #place_order:focus-visible {
    outline: 3px solid var(--primary-gold);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(216, 168, 27, 0.2);
}

/* Focus states for quantity inputs */
.woocommerce div.product form.cart .quantity input:focus-visible,
.woocommerce .quantity input:focus-visible {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
}

/* Focus states for tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs li a:focus-visible {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
    position: relative;
    z-index: 1;
}

/* Focus states for product images (clickable/zoomable) */
.woocommerce div.product div.images .woocommerce-product-gallery__image a:focus-visible,
.woocommerce div.product .flex-control-thumbs li img:focus-visible {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Focus states for checkout form inputs */
.woocommerce-checkout input[type="text"]:focus-visible,
.woocommerce-checkout input[type="email"]:focus-visible,
.woocommerce-checkout input[type="tel"]:focus-visible,
.woocommerce-checkout textarea:focus-visible,
.woocommerce-checkout select:focus-visible {
    outline: 3px solid var(--primary-gold);
    outline-offset: 1px;
}

/* Focus states for product meta links */
.woocommerce div.product .product_meta a:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Focus states for pagination */
.woocommerce nav.woocommerce-pagination ul li a:focus-visible,
.woocommerce nav.woocommerce-pagination ul li span:focus-visible {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
}

/* Focus states for cart table links */
.woocommerce table.shop_table .product-name a:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to main content link for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-gold);
    color: var(--primary-dark);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 700;
    z-index: 100;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

/* Enhanced text contrast for better readability - WCAG AAA Compliance */
.hero-description,
.hero-brand-tagline {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.95); /* Improved from 0.9 for better contrast */
}

.hero-title {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-brand-name {
    text-shadow: 0 2px 10px rgba(216, 168, 27, 0.6), 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* Improved breadcrumb visibility - WCAG AA compliant */
.breadcrumb-item {
    opacity: 0.7; /* Improved from 0.5 for better visibility and contrast ratio */
}

/* Loading skeleton for images */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.woocommerce ul.products li.product img:not([src]),
.featured-product-image img:not([src]) {
    background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 400px 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}

/* Improved touch targets for mobile - WCAG 2.1 Level AAA (minimum 44x44px) */
@media (max-width: 768px) {
    .woocommerce .button,
    .featured-product-button,
    .hero-feature {
        min-height: 44px; /* WCAG 2.1 AAA minimum touch target size */
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Reduced motion support for users with motion sensitivity */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .woocommerce ul.products li.product:hover,
    .woocommerce .button:hover {
        transform: none;
    }
}

/* ==========================================================================
   Enhanced UI/UX Improvements
   ========================================================================== */

/* Stock Availability Indicator */
.stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 24px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.stock.in-stock {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 2px solid #4caf50;
}

.stock.out-of-stock {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 2px solid #f44336;
}

.stock.low-stock {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    border: 2px solid #ff9800;
}

.stock::before {
    content: '●';
    font-size: 1.2rem;
}

/* Enhanced Quantity Controls with +/- Buttons */
/* NOTE: Commented out until JavaScript implementation is added (see header for details)
.quantity {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.quantity-button {
    width: 44px;
    height: 44px;
    border: 2px solid #d0d0d0;
    background: #ffffff;
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.quantity-button:hover {
    border-color: var(--primary-gold);
    background: var(--primary-gold);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(216, 168, 27, 0.3);
}

.quantity-button:active {
    transform: scale(0.95);
}

.quantity-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}
*/

/* Product Rating Stars */
.woocommerce .star-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.2rem;
    color: #ffa726;
    margin-bottom: 15px;
}

.woocommerce .star-rating .star {
    position: relative;
    display: inline-block;
}

.woocommerce .star-rating .star::before {
    content: '★';
    color: #e0e0e0;
}

.woocommerce .star-rating .star.filled::before {
    color: #ffa726;
}

.woocommerce .star-rating .star.half::before {
    background: linear-gradient(90deg, #ffa726 50%, #e0e0e0 50%);
    -webkit-background-clip: text; /* Safari/Chrome */
    -webkit-text-fill-color: transparent;
    background-clip: text; /* Standard property */
    /* Fallback for browsers that don't support background-clip: text */
    color: #ffa726;
}

.woocommerce .rating-count {
    font-size: 0.9rem;
    color: #666;
    margin-left: 8px;
    font-weight: 600;
}

/* Wishlist/Favorite Button */
/* NOTE: Commented out until JavaScript/plugin implementation is added (see header for details)
.product-wishlist-button {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(216, 168, 27, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
}

.product-wishlist-button:hover {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 20px rgba(216, 168, 27, 0.4);
}

.product-wishlist-button.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

.product-wishlist-button i {
    font-size: 1.2rem;
    color: var(--primary-dark);
    transition: color 0.3s ease;
}

.product-wishlist-button:hover i,
.product-wishlist-button.active i {
    color: #ffffff;
}
*/

/* Success/Error Message Animations */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    animation: slideInDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woocommerce-message {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-left: 5px solid #4caf50;
}

.woocommerce-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border-left: 5px solid #f44336;
}

.woocommerce-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border-left: 5px solid #2196f3;
}

.woocommerce-message::before {
    content: '✓';
    font-size: 1.5rem;
    font-weight: 700;
}

.woocommerce-error::before {
    content: '✕';
    font-size: 1.5rem;
    font-weight: 700;
}

.woocommerce-info::before {
    content: 'ℹ';
    font-size: 1.5rem;
    font-weight: 700;
}

/* Enhanced Loading States */
.woocommerce .loading,
.woocommerce.processing {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.woocommerce .loading::after,
.woocommerce.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(216, 168, 27, 0.2);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Sticky Add to Cart Bar (Mobile) */
/* NOTE: Commented out until JavaScript implementation is added (see header for details)
.sticky-add-to-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 100%);
    padding: 15px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--primary-gold);
}

.sticky-add-to-cart.visible {
    transform: translateY(0);
}

.sticky-add-to-cart-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.sticky-product-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.sticky-product-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sticky-product-details {
    flex: 1;
    min-width: 0;
}

.sticky-product-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-dark);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-product-price {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin: 0;
}

.sticky-add-to-cart-button {
    background: var(--gradient-gold);
    color: #2B2823 !important;
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(216, 168, 27, 0.3);
}

.sticky-add-to-cart-button:hover {
    background: var(--gradient-gold-dark);
    color: #ffffff !important;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(216, 168, 27, 0.5);
}
*/

/* Product Share Buttons */
/* NOTE: Commented out until JavaScript/plugin implementation is added (see header for details)
.product-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
}

.product-share-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #666;
    margin-right: 8px;
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.share-button:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-button.facebook {
    color: #1877f2;
    border-color: rgba(24, 119, 242, 0.2);
}

.share-button.facebook:hover {
    background: #1877f2;
    color: #ffffff;
}

.share-button.twitter {
    color: #1da1f2;
    border-color: rgba(29, 161, 242, 0.2);
}

.share-button.twitter:hover {
    background: #1da1f2;
    color: #ffffff;
}

.share-button.pinterest {
    color: #e60023;
    border-color: rgba(230, 0, 35, 0.2);
}

.share-button.pinterest:hover {
    background: #e60023;
    color: #ffffff;
}

.share-button.whatsapp {
    color: #25d366;
    border-color: rgba(37, 211, 102, 0.2);
}

.share-button.whatsapp:hover {
    background: #25d366;
    color: #ffffff;
}
*/

/* Performance Optimization - Reduce Paint Complexity */
.woocommerce ul.products li.product,
.featured-product-card,
.woocommerce div.product {
    contain: layout style paint;
}

/* Only apply will-change on hover for better memory management */
.woocommerce ul.products li.product:hover,
.featured-product-card:hover {
    will-change: transform;
}

/* Remove will-change after animation completes */
.woocommerce ul.products li.product:not(:hover),
.featured-product-card:not(:hover) {
    will-change: auto;
}

/* Simplified gradients for better performance */
@media (max-width: 768px) {
    /* Reduce gradient complexity on mobile */
    .hero-background {
        background-image: var(--gradient-hero-overlay), var(--hero-bg-image, none);
    }
}

/* ==========================================================================
   Responsive Design Improvements
   ========================================================================== */

@media (max-width: 768px) {
    /* Hero Section Mobile */
    .shop-hero-section {
        padding: var(--hero-mobile-padding);
        margin-bottom: 40px;
    }

    .hero-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }

    .hero-brand {
        align-items: center;
        text-align: center;
        min-height: auto;
    }

    .hero-brand-frame {
        padding: var(--hero-brand-frame-mobile-padding);
        width: 100%;
        max-width: 320px;
    }

    .hero-logo img {
        width: 90px;
        height: 90px;
    }

    .hero-brand-name {
        font-size: 1.6rem;
        margin: 8px 0 0 0;
    }

    .hero-brand-tagline {
        font-size: 0.9rem;
    }

    .hero-brand-trust .trust-item {
        font-size: 0.8rem;
    }

    .hero-brand-trust .trust-item i {
        font-size: 0.95rem;
    }

    .hero-text-content {
        max-width: 100%;
        text-align: center;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 20px;
    }

    .hero-features {
        justify-content: center;
        gap: 15px;
    }

    .hero-feature {
        font-size: 0.8rem;
    }

    .hero-feature i {
        font-size: 1.1rem;
    }

    /* Hidden on mobile to reduce vertical space (~40% reduction) and improve page load performance */
    .hero-product-image {
        display: none;
    }

    /* Simple Header Mobile */
    .shop-header-simple {
        padding: 40px 0 30px;
    }

    .shop-header-simple h1 {
        font-size: 1.8rem;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .woocommerce {
        padding: 20px;
    }

    /* Featured Products Mobile */
    .featured-products-section {
        padding: 50px 0;
        margin-bottom: 40px;
    }

    .section-header {
        padding-left: 15px;
        margin-bottom: 35px;
    }

    .section-header::before {
        height: 30px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .featured-products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Cart Header Mobile */
    .cart-page-header {
        padding: 30px 0 40px;
        margin-bottom: 30px;
    }

    .cart-header-content {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }

    .cart-logo img {
        width: 70px;
        height: 70px;
    }

    .cart-header-text h1 {
        font-size: 1.8rem;
    }

    .cart-subtitle {
        font-size: 1rem;
    }

    /* Cart Breadcrumbs Mobile */
    .cart-breadcrumbs {
        max-width: 100%;
        gap: 10px;
    }

    .breadcrumb-item {
        gap: 5px;
    }

    .breadcrumb-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .breadcrumb-text {
        font-size: 0.7rem;
    }

    .breadcrumb-divider {
        width: 25px;
        margin-top: -20px;
    }

    /* Single Product Page Mobile Optimizations */
    .single-product-wrapper {
        padding: 40px 0;
    }

    .woocommerce div.product {
        padding: 30px 20px;
        border-radius: 12px;
    }

    .woocommerce div.product::before {
        width: 120px;
        height: 120px;
    }

    .woocommerce div.product .product_title {
        font-size: 1.8rem;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .woocommerce div.product .product_title::after {
        width: 60px;
        height: 3px;
    }

    .woocommerce div.product p.price {
        font-size: 2.2rem;
        padding: 15px 0;
        margin-bottom: 25px;
    }

    .woocommerce div.product p.price::before {
        width: 4px;
        left: -15px;
    }

    .product-trust-signals {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 12px;
    }

    .trust-signal {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .woocommerce div.product .woocommerce-product-details__short-description {
        font-size: 1.05rem;
        padding: 25px 20px;
        margin-bottom: 30px;
    }

    .woocommerce div.product .woocommerce-product-details__short-description::before {
        font-size: 3rem;
        top: 10px;
        left: 10px;
    }

    .woocommerce div.product form.cart {
        padding: 25px 20px;
    }

    .woocommerce div.product form.cart .quantity {
        display: block;
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }

    .woocommerce div.product form.cart .quantity input {
        width: 100%;
        padding: 14px 20px;
        font-size: 1.1rem;
    }

    .woocommerce div.product form.cart .single_add_to_cart_button {
        width: 100%;
        padding: 1.1rem 2rem;
        font-size: 1.1rem;
    }

    .woocommerce div.product .woocommerce-tabs {
        margin-top: 50px;
        padding: 25px 20px;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs {
        flex-direction: column;
        gap: 8px;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs li {
        width: 100%;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs li a {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .woocommerce div.product .product_meta > span {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    .woocommerce div.product .flex-control-thumbs {
        padding: 12px;
        gap: 8px;
    }

    .woocommerce div.product .flex-control-thumbs li {
        width: 70px;
        height: 70px;
    }
}
