*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body { font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #2c2c2c; background: #fff; overflow-x: hidden; width: 100%; -webkit-font-smoothing: antialiased; }

  /* ── RESPONSIVE IMAGE CONTAINMENT ── */
  img { max-width: 100%; height: auto; display: block; }

  /* Visually hidden utility class for accessibility */
  .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

  

  /* ── HERO SLIDER (CLS FIXED WITH ASPECT RATIO CONTAINER) ── */
  .hero-slider { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1920 / 700; background: #f7f3ee; }
  .slides-container { display: flex; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); width: 100%; height: 100%; }
  .slide { min-width: 100%; width: 100%; height: 100%; position: relative; flex-shrink: 0; }
  .slide img { width: 100%; height: 100%; aspect-ratio: 1920 / 700; object-fit: cover; }

  .slider-arrows { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; padding: 0 12px; pointer-events: none; }
  .arrow-btn { pointer-events: all; background: rgba(255,255,255,0.9); border: none; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.15); font-size: 16px; color: #b94a1a; font-weight: 700; transition: background 0.18s; }
  .arrow-btn:hover { background: #fff; }
  
  /* ACCESSIBLE SLIDER DOTS (44px Minimum Touch Target) */
  .slider-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 10; }
  .dot { width: 44px; height: 44px; background: transparent; border: none; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  .dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.6); transition: transform 0.2s, background 0.2s; }
  .dot.active::after { background: #fff; transform: scale(1.4); }

  /* ── SECTION COMMONS ── */
  .section-wrap { max-width: 1300px; margin: 0 auto; padding: 0 20px; width: 100%; }
  .section-heading { text-align: center; padding: 48px 0 8px; }
  #main-heading { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: #2c2c2c; line-height: 1.3; }
  .section-heading h2 { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; color: #2c2c2c; line-height: 1.25; }
  
  /* WCAG AA Contrast Fix for body description text */
  .section-heading p { font-size: 14.5px; color: #4b5563; margin-top: 10px; font-weight: 400; line-height: 1.6; max-width: 800px; margin-left: auto; margin-right: auto; }
  .divider-line { width: 64px; height: 3px; background: #b94a1a; margin: 14px auto 0; border-radius: 2px; }

  @media (max-width: 768px) { 
    .section-heading { padding: 24px 0 6px; } 
    #main-heading { font-size: 20px; } 
    .section-heading h2 { font-size: 24px; }
  }

  /* ── LOADING SPINNER ── */
  .loading { display: none; text-align: center; padding: 40px 20px; }
  .spinner { width: 44px; height: 44px; border: 3px solid #ebebeb; border-top-color: #b94a1a; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 12px; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .loading p { font-size: 13.5px; color: #4b5563; }

  /* ── PRODUCT GRID (CLS PROTECTION & MOBILE 2-COL ALIGNMENT) ── */
  .product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-top: 28px; margin-bottom: 12px; min-height: 350px; }
  .product-card { background: #fff; border: 1px solid #ebebeb; border-radius: 12px; overflow: hidden; transition: transform 0.22s, box-shadow 0.22s; position: relative; display: flex; flex-direction: column; width: 100%; }
  .product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
  
  .product-card .img-wrap { position: relative; aspect-ratio: 1 / 1; width: 100%; overflow: hidden; background: #f9f5f2; }
  .product-card .img-wrap img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 0.4s ease, opacity 0.3s ease; position: absolute; top: 0; left: 0; }
  .product-card .img-wrap .img-primary { opacity: 1; z-index: 2; }
  .product-card .img-wrap .img-hover { opacity: 0; z-index: 1; }
  .product-card:hover .img-wrap .img-primary.has-hover { opacity: 0; }
  .product-card:hover .img-wrap .img-hover { opacity: 1; z-index: 3; }
  .product-card:hover .img-wrap img { transform: scale(1.05); }
  
  /* ── BADGES ── */
  .sale-badge { position: absolute; top: 8px; left: 8px; background: #b94a1a; color: #fff; font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; letter-spacing: 0.04em; z-index: 5; }
  .discount-badge-right { position: absolute; top: 8px; right: 8px; background: #2c2c2c; color: #fff; font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; letter-spacing: 0.04em; z-index: 5; }
  
  .product-card .info { padding: 12px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; }
  .product-card h2 { font-size: 13.5px; font-weight: 700; color: #2c2c2c; line-height: 1.35; margin-bottom: 6px; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  
  .price-row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
  .price-sale { font-size: 15px; font-weight: 700; color: #b94a1a; }
  .price-original { font-size: 12px; color: #64748b; text-decoration: line-through; }
  
  /* ── PRODUCT ACTIONS ── */
  .product-actions { display: flex; gap: 6px; }
  .add-to-cart { flex: 1; background: #2c2c2c; color: #fff; border: none; border-radius: 6px; padding: 9px 4px; font-family: 'Nunito', sans-serif; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background 0.2s; min-height: 38px; }
  .add-to-cart:hover { background: #b94a1a; }
  .view-details-btn { background: #fdf0eb; color: #b94a1a; border: 1px solid #f5cfc0; border-radius: 6px; padding: 9px 10px; font-size: 13px; cursor: pointer; transition: background 0.2s; display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; }
  .view-details-btn:hover { background: #b94a1a; color: #fff; }

  /* ── VIEW ALL ── */
  .view-all-wrap { text-align: center; padding: 24px 0 44px; }
  .view-all-btn { display: inline-block; border: 2px solid #b94a1a; color: #b94a1a; font-family: 'Nunito', sans-serif; font-size: 13.5px; font-weight: 700; padding: 10px 32px; border-radius: 8px; text-decoration: none; transition: background 0.2s, color 0.2s; }
  .view-all-btn:hover { background: #b94a1a; color: #fff; }

  /* ── SECTION BANNERS (CLS FIXED WITH ASPECT RATIO) ── */
  .section-banner { width: 100%; display: block; aspect-ratio: 1920 / 700; background: #f7f3ee; overflow: hidden; }
  .section-banner img { width: 100%; height: 100%; aspect-ratio: 1920 / 700; object-fit: cover; }

  /* ── SHOP BY COLLECTION TABS ── */
  .collection-section { padding: 44px 0; }
  .tabs-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; border-bottom: 2px solid #ebebeb; margin-bottom: 28px; }
  
  @media (max-width: 640px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .product-card .info { padding: 8px; }
    .product-card h2 { font-size: 12.5px; height: 32px; }
    .tab-btn { padding: 8px 14px !important; font-size: 12.5px !important; }
  }

  .tab-btn { background: none; border: none; cursor: pointer; font-family: 'Nunito', sans-serif; font-size: 14.5px; font-weight: 700; color: #4b5563; padding: 10px 24px; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color 0.2s, border-color 0.2s; min-height: 44px; }
  .tab-btn.active { color: #b94a1a; border-bottom-color: #b94a1a; }
  .tab-panel { display: none; }
  .tab-panel.active { display: block; }

  @media (min-width: 1024px) {
    #featuredProducts, #bestsellersGrid, #newarrivalsGrid { grid-template-columns: repeat(6, 1fr) !important; }
  }

  /* ── WISHLIST BUTTON ── */
  .wishlist-btn { position: absolute; bottom: 10px; right: -55px; background: rgba(0, 0, 0, 0.4) !important; border: 1.5px solid #ffffff; border-radius: 18px 0 0 18px; padding: 6px 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); z-index: 5; color: #ffffff; font-size: 15px; opacity: 0; visibility: hidden; transition: all 0.25s ease; min-height: 34px; }
  .product-card:hover .wishlist-btn { right: 0; opacity: 1; visibility: visible; }
  .wishlist-btn:hover { background: rgba(0, 0, 0, 0.65) !important; }
  .wishlist-btn.active { right: 0 !important; opacity: 1 !important; visibility: visible !important; color: #e11d48 !important; }

  
  /* ── GPU-COMPOSITED WHATSAPP WIDGET (Eliminates CLS & Paint Janks) ── */
  .whatsapp-container { position: fixed; bottom: 20px; left: 20px; z-index: 1000; font-family: 'Nunito', sans-serif; }
  .whatsapp-float { width: 56px; height: 56px; background-color: #25d366; color: #FFF; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); cursor: pointer; transition: transform 0.25s ease; position: relative; }
  .whatsapp-float::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #25d366; opacity: 0.8; animation: pulseWaGpu 2s infinite cubic-bezier(0.24, 0, 0.38, 1); pointer-events: none; }
  @keyframes pulseWaGpu { 0% { transform: scale(0.95); opacity: 0.8; } 70% { transform: scale(1.35); opacity: 0; } 100% { transform: scale(1.35); opacity: 0; } }
  .whatsapp-float:hover { transform: translateY(-3px); }
  
  .whatsapp-popup { position: absolute; bottom: 70px; left: 0; width: 280px; background: #fff; border-radius: 12px; box-shadow: 0 8px 25px rgba(0,0,0,0.15); overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(16px); transition: all 0.25s ease; }
  .whatsapp-popup.active { opacity: 1; visibility: visible; transform: translateY(0); }
  .wa-header { background: #075e54; color: #fff; padding: 14px; font-size: 14.5px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
  .wa-close { cursor: pointer; font-size: 22px; line-height: 1; opacity: 0.8; border: none; background: transparent; color: #fff; }
  .wa-body { padding: 16px; background: #ece5dd; }
  .wa-message { background: #fff; padding: 10px 14px; border-radius: 0 10px 10px 10px; font-size: 12.5px; color: #2c2c2c; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
  .wa-btn { display: block; text-align: center; background: #25d366; color: #fff; text-decoration: none; padding: 10px; border-radius: 20px; font-weight: 700; font-size: 13.5px; }

  
  /* ── MODALS ── */
  .modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
  .modal-content { background: #fff; border-radius: 14px; max-width: 860px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
  .close-modal { position: absolute; top: 12px; right: 16px; font-size: 26px; color: #4b5563; cursor: pointer; z-index: 10; background: none; border: none; min-width: 40px; min-height: 40px; }
  .modal-body { padding: 24px; }
  .modal-product { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  @media (max-width: 768px) { .modal-product { grid-template-columns: 1fr; gap: 16px; } }
  .modal-details h2 { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: #2c2c2c; margin-bottom: 6px; }
  .modal-category { font-size: 12.5px; color: #4b5563; margin-bottom: 14px; }
  .modal-price { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
  .modal-price .price-sale { font-size: 22px; }
  .modal-price .price-original { font-size: 15px; }
  .discount-tag { background: #fdf0eb; color: #b94a1a; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; border: 1px solid #f5cfc0; }
  .modal-description { font-size: 13.5px; color: #4b5563; line-height: 1.6; margin-bottom: 20px; }
  
  .quantity-selector { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
  .quantity-selector label { font-size: 13.5px; font-weight: 600; color: #2c2c2c; }
  .quantity-selector button { width: 34px; height: 34px; border: 1px solid #ebebeb; background: #fff; border-radius: 6px; font-size: 16px; cursor: pointer; }
  .quantity-selector input { width: 50px; height: 34px; text-align: center; border: 1px solid #ebebeb; border-radius: 6px; font-family: 'Nunito', sans-serif; font-size: 13.5px; outline: none; }

  /* ── MODAL SLIDER ── */
  .modal-slider-wrap { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: #f9f5f2; aspect-ratio: 1 / 1; }
  .modal-slider-img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: none; }
  .modal-slider-img.active { display: block; }
  .modal-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.9); border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #b94a1a; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
  .modal-arrow.left { left: 8px; }
  .modal-arrow.right { right: 8px; }
  .modal-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-top: 10px; }
  .modal-thumbnail { width: 60px; height: 60px; aspect-ratio: 1; border-radius: 6px; cursor: pointer; border: 2px solid transparent; object-fit: cover; opacity: 0.6; flex-shrink: 0; }
  .modal-thumbnail.active, .modal-thumbnail:hover { opacity: 1; border-color: #b94a1a; }

  /* ── LOGIN MODAL ── */
  .login-modal { max-width: 400px; padding: 20px; }
  .login-form h2, .register-form h2 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: #2c2c2c; margin-bottom: 20px; text-align: center; }
  .form-group { margin-bottom: 14px; }
  .form-group label { display: block; font-size: 12.5px; font-weight: 600; color: #2c2c2c; margin-bottom: 4px; }
  .form-group input { width: 100%; padding: 10px 12px; border: 1px solid #ebebeb; border-radius: 6px; font-family: 'Nunito', sans-serif; font-size: 13.5px; outline: none; }
  .form-group input:focus { border-color: #b94a1a; }
  .login-btn, .register-btn { width: 100%; background: #b94a1a; color: #fff; border: none; border-radius: 6px; padding: 12px; font-family: 'Nunito', sans-serif; font-size: 13.5px; font-weight: 700; cursor: pointer; margin-top: 6px; }
  .register-link, .login-link { text-align: center; margin-top: 14px; font-size: 12.5px; color: #4b5563; }
  .register-link a, .login-link a { color: #b94a1a; font-weight: 600; text-decoration: none; }

/* ── DYNAMIC 3D CATEGORY CAROUSEL SECTION ── */
.categories-carousel-section {
    max-width: 1300px;
    margin: 60px auto;
    padding: 0 20px;
}
.categories-carousel-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    color: #2c2c2c;
    margin-bottom: 36px;
}

/* Container supporting grid for desktop and smooth horizontal scroll for mobile */
.categories-slider-wrap {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}

/* Individual Card */
.category-card {
    background: #F28353;
    border: 1px solid #3D1605;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(185, 74, 26, 0.1);
    border-color: #3D1605;
}

/* Category Title Above */
.category-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.category-card:hover h3 {
    color: #2c2c2c;
}

/* Circular Soft Background Container */
.category-circle-wrap {
    width: 220px;
    height: 220px;
    background: #fbf8f5; /* Soft beige circle background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 16px;
    transition: background 0.3s ease;
}
.category-card:hover .category-circle-wrap {
    background: #f5efe9;
}

/* 3D Pop-out Transparent Image */
.category-circle-wrap img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    filter: drop-shadow(0 12px 16px rgba(0,0,0,0.12));
}
.category-card:hover .category-circle-wrap img {
    transform: scale(1.15) translateY(-6px); /* 3D popup effect */
    filter: drop-shadow(0 20px 24px rgba(0,0,0,0.18));
}

/* Item Count Below */
.category-items-count {
    font-size: 13.5px;
    font-weight: 600;
    color: #2c2c2c;
    font-family: 'Nunito', sans-serif;
}

/* Responsive & Mobile Horizontal Scroller */
@media (max-width: 1024px) {
    .categories-carousel-section {
        margin: 30px auto;
        padding: 0 12px;
    }
    
    .categories-carousel-section h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .categories-slider-wrap {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 16px;
        scrollbar-width: thin;
        scrollbar-color: #b94a1a #f1f1f1;
        /* Adds side padding so the next card peeks in nicely */
        padding-left: 12px;
        padding-right: 12px;
    }
    .categories-slider-wrap::-webkit-scrollbar {
        height: 4px;
    }
    .categories-slider-wrap::-webkit-scrollbar-thumb {
        background: #b94a1a;
        border-radius: 10px;
    }

    /* Compact card dimensions showing ~1.5 cards on screen */
    .category-card {
        flex: 0 0 160px; /* Reduced width */
        padding: 16px 10px; /* Reduced height/padding */
        border-radius: 16px;
        scroll-snap-align: start;
    }

    /* Smaller title font */
    .category-card h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }

    /* Smaller circular container */
    .category-circle-wrap {
        width: 110px;
        height: 110px;
        margin-bottom: 8px;
    }

    /* Smaller item count text */
    .category-items-count {
        font-size: 11.5px;
    }
}