/* ==============================================================
   SONIC STOREFRONT — Main Design System
   store.css
   Mobile-first, RTL-ready, premium dark e-commerce theme.
   All colors are driven by CSS variables from theme.php.
   ==============================================================

   TABLE OF CONTENTS
   1.  Reset & Base
   2.  Typography
   3.  Layout & Grid
   4.  Header / Navigation
   5.  Hero Slider
   6.  Product Cards
   7.  Category Chips
   8.  Buttons
   9.  Cart Sidebar (Off-canvas)
   10. Forms & Inputs
   11. Toast Notifications
   12. Badges & Labels
   13. Empty States
   14. Breadcrumb
   15. Section Headers
   16. Product Detail Page
   17. Cart Page
   18. Checkout Page
   19. Customer Auth Pages
   20. Footer
   21. Loader / Skeleton
   22. Back-to-Top
   23. Utility Classes
   24. Media Queries
   ============================================================== */


/* 0. FONTS moved to header.php inline for better FCP */

:root {
  /* Accessibility: Darker muted text for better contrast on light backgrounds */
  --text-muted: #595959; 
  --text-light: #444444;
}

/* Accessibility: Global Touch Targets */
button, 
.store-header__btn, 
.social-btn, 
.cart-sidebar__close, 
.back-to-top, 
.store-header__hamburger,
.mobile-nav-link,
.mobile-nav-accordion__btn {
  min-width: 44px;
  min-height: 44px;
}

/* ─────────────────────────────────────────────────────────────
   1. RESET & BASE
   ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Cairo', 'Tajawal', 'Inter', system-ui, sans-serif;
  background-color: var(--page-bg, #0D0D0D);
  color: var(--text-main, #F5F5F5);
  line-height: 1.65;
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

::selection {
  background: var(--accent);
  color: var(--btn-primary-text, #0D0D0D);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--page-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}


/* ─────────────────────────────────────────────────────────────
   2. TYPOGRAPHY
   ───────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2.0rem);
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

h4 {
  font-size: 1.15rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.875rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.text-accent {
  color: var(--accent) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-main {
  color: var(--text-main) !important;
}

.fw-600 {
  font-weight: 600 !important;
}

.fw-700 {
  font-weight: 700 !important;
}

.fw-800 {
  font-weight: 800 !important;
}

.small {
  font-size: 0.85rem;
}

.xsmall {
  font-size: 0.75rem;
}


/* ─────────────────────────────────────────────────────────────
   3. LAYOUT & GRID
   ───────────────────────────────────────────────────────────── */
.store-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .store-header__btn, 
  .social-btn,
  .cart-sidebar__close,
  .back-to-top {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  .store-container {
    padding: 0 40px;
  }
}

.store-section {
  padding: 56px 0;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* ─────────────────────────────────────────────────────────────
   3b. SECTION HEADERS
   ───────────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-title {
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  font-size: clamp(0.85rem, 3vw, 0.96rem);
  color: var(--text-muted);
  line-height: 1.6;
}

.section-header--side {
  text-align: right;
  align-items: flex-start;
  margin-left: auto;
  margin-right: 0;
}

.section-header--side .section-title::after {
  margin-right: 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}


/* ─────────────────────────────────────────────────────────────
   4. HEADER / NAVIGATION
   ───────────────────────────────────────────────────────────── */
.store-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header, 1000);
  background: rgba(var(--header-bg-rgb, 13, 13, 13), var(--glass-opacity, 0.85));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.store-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
  flex-wrap: nowrap;
  /* Prevent items from falling out */
}

.store-header__col-start {
  display: none;
  /* Hide mobile hamburger on desktop */
}

.store-header__col-center {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.store-nav-desktop {
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}

.store-header__col-end {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Logo */
.store-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.store-header__logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.store-header__logo-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--header-text, #fff);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Search bar */
.store-header__search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.store-header__search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(var(--accent-rgb), 0.1);
  border-radius: 50px;
  padding: 10px 20px 10px 45px;
  font-size: 0.875rem;
  color: var(--header-text);
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.store-header__search input::placeholder {
  color: var(--header-text);
  opacity: 0.55;
}

.store-header__search input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.store-header__search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--header-icons);
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.8;
}

/* Header actions */
.store-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-header__btn {
  background: transparent;
  border: none;
  color: var(--header-icons, #D4AF37);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  position: relative;
  transition: var(--transition);
}

.store-header__btn:hover {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  transform: scale(1.05);
}

.store-header__btn .badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-primary-text);
  font-size: 0.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Hamburger (mobile) */
.store-header__hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--header-text, #fff);
  font-size: 1.3rem;
  padding: 6px;
}

/* Category Nav Bar (below header) */
.store-nav {
  background: var(--surface-bg);
  border-bottom: 1px solid var(--border-color);
}

.store-nav__inner {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  height: 48px;
  padding: 0 4px;
}

.store-nav__inner::-webkit-scrollbar {
  display: none;
}

.store-nav__link {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}

.store-nav__link:hover,
.store-nav__link.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.25);
}

.store-nav-desktop .store-nav__link {
  color: var(--header-text-color, #fff);
}


/* ─────────────────────────────────────────────────────────────
   5. HERO SLIDER (Unified Responsive System)
   ─────────────────────────────────────────────────────────────
   Best Image Size Guide:
   • Desktop:  1920 x 820  (ratio ≈ 21:9)
   • Tablet:   1200 x 675  (ratio = 16:9)
   • Mobile:    800 x 600  (ratio = 4:3)
   Use ONE image at 1920x820 and CSS handles the rest.
   ───────────────────────────────────────────────────────────── */

.store-hero-slider {
  padding: 0 !important;
  margin-top: 0 !important;
  overflow: hidden;
}

.main-hero-swiper {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  background: #000;
  position: relative;
}

.hero-slide-container {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  /* Premium ultra-wide */
  overflow: hidden;
}

.hero-slide__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 6s ease;
}

/* Ken Burns zoom on active slide */
.swiper-slide-active .hero-slide__img {
  transform: scale(1.05);
}

/* ── Overlay & Content ── */
.slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 clamp(30px, 5vw, 80px);
  background: linear-gradient(105deg,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.3) 40%,
      transparent 70%);
  z-index: 5;
}

[dir="ltr"] .slide-overlay {
  justify-content: flex-start;
  background: linear-gradient(-105deg,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.3) 40%,
      transparent 70%);
}

.slide-content {
  max-width: 550px;
  color: #fff;
  animation: slideInRight 0.6s ease forwards;
}

.slide-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
  line-height: 1.15;
}

.slide-content p {
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  margin-bottom: 28px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  opacity: 0.9;
  line-height: 1.6;
}

.slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
}

.slide-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ── Navigation Arrows ── */
.swiper-nav-btn {
  color: #fff !important;
  width: 48px !important;
  height: 48px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.3s ease;
}

.swiper-nav-btn::after {
  font-size: 1.1rem !important;
  font-weight: 900;
}

.swiper-nav-btn:hover {
  background: var(--accent) !important;
  border-color: var(--accent);
  transform: scale(1.1);
}

/* ── Pagination Dots ── */
.main-hero-swiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.3;
  width: 10px;
  height: 10px;
  transition: all 0.3s ease;
}

.main-hero-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--accent);
  width: 28px;
  border-radius: 5px;
}

/* ── Tablet (max 1024px) ── */
@media (max-width: 1024px) {
  .hero-slide-container {
    aspect-ratio: 16 / 9;
  }

  .slide-content {
    max-width: 420px;
  }
}

/* ── Mobile (max 768px) ── */
@media (max-width: 768px) {
  .store-hero-slider {
    padding: 0 !important;
    margin-top: 0 !important;
  }

  .main-hero-swiper {
    border-radius: 18px;
  }

  .hero-slide-container {
    aspect-ratio: 4 / 3;
  }

  .slide-overlay {
    padding: 20px;
    align-items: flex-end;
    background: transparent !important; /* Removed dark overlay on mobile */
  }

  .slide-content {
    max-width: 100%;
    text-align: center;
  }

  .slide-content h2 {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }

  .slide-content p {
    font-size: 0.78rem;
    margin-bottom: 14px;
  }

  .slide-btn {
    padding: 8px 20px;
    font-size: 0.78rem;
  }

  .swiper-nav-btn {
    width: 32px !important;
    height: 32px !important;
  }

  .swiper-nav-btn::after {
    font-size: 0.7rem !important;
  }

  .main-hero-swiper .swiper-pagination {
    bottom: 8px !important;
  }

  .main-hero-swiper .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
  }

  .main-hero-swiper .swiper-pagination-bullet-active {
    width: 20px;
  }
}

/* ── Small Mobile (max 480px) ── */
@media (max-width: 480px) {
  .hero-slide-container {
    aspect-ratio: 3 / 2;
  }

  .store-hero-slider {
    padding: 8px 0;
  }

  .main-hero-swiper {
    border-radius: 14px;
  }

  .slide-content h2 {
    font-size: 1rem;
  }

  .slide-content p {
    display: none;
    /* Hide subtitle on very small screens */
  }
}


/* ─────────────────────────────────────────────────────────────
   6. PRODUCT CARDS
   ───────────────────────────────────────────────────────────── */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%; /* Force equal height */
  min-width: 0;
}

/* Ensure swiper slides stretch to the tallest card */
.swiper-slide {
  height: auto !important;
  display: flex;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(var(--accent-rgb), 0.15);
}

/* Image wrapper */
.product-card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--surface-bg);
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card__img {
  transform: scale(1.06);
}

/* Quick actions overlay */
.product-card__actions {
  position: absolute;
  bottom: -56px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  transition: bottom 0.3s ease;
}

.product-card:hover .product-card__actions {
  bottom: 0;
}

.product-card__action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.product-card__action-btn--cart {
  background: var(--accent);
  color: var(--btn-primary-text);
}

.product-card__action-btn--cart:hover {
  background: var(--btn-primary-text);
  color: var(--accent);
  transform: scale(1.1);
}

.product-card__action-btn--select {
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
}

.product-card__action-btn--select:hover {
  background: #16283d;
  color: #fff;
}

.product-card__action-btn--wishlist {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.product-card__action-btn--wishlist:hover {
  background: rgba(220, 60, 60, 0.2);
  color: #f87171;
}

/* Badges */
.product-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.product-card__badge--new {
  background: var(--accent);
  color: var(--btn-primary-text);
}

.product-card__badge--sale {
  background: #ef4444;
  color: #fff;
}

.product-card__badge--outofstock {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* Card body */
.product-card__body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.product-card__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.product-card__stars {
  color: #FBBF24;
  font-size: 0.7rem;
}

.product-card__rating-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.product-card__price-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex-shrink: 1;
}

.product-card__price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--price-color);
  white-space: nowrap;
}

.product-card__price-old {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card__add-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.product-card__add-btn--select {
  width: auto;
  min-width: 90px;
  padding: 0 12px;
  border-radius: 999px;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.08);
  color: #16283d;
}

.product-card__add-btn:hover {
  background: var(--accent);
  color: var(--btn-primary-text);
  transform: scale(1.1);
}

.product-card__add-btn--select:hover {
  transform: translateY(-1px);
}

.product-card__add-btn:active {
  transform: scale(0.95);
}

/* Out of stock overlay */
.product-card--outofstock .product-card__img-wrap::after {
  content: "نفذت الكمية";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  backdrop-filter: blur(3px);
}


/* ─────────────────────────────────────────────────────────────
   7. CATEGORY CHIPS
   ───────────────────────────────────────────────────────────── */
.category-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
  min-width: 90px;
  cursor: pointer;
  text-decoration: none;
}

.category-chip:hover,
.category-chip.active {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-2px);
}

.category-chip__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
}

.category-chip__name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}


/* ─────────────────────────────────────────────────────────────
   8. BUTTONS
   ───────────────────────────────────────────────────────────── */
.btn-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-store:active {
  transform: scale(0.97);
}

.btn-store-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.btn-store-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
  color: var(--btn-primary-text);
}

.btn-store-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-store-outline:hover {
  background: var(--accent);
  color: var(--btn-primary-text);
  transform: translateY(-2px);
}

.btn-store-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-store-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-store-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-store-danger:hover {
  background: #ef4444;
  color: #fff;
}

.btn-store-sm {
  padding: 8px 18px;
  font-size: 0.8rem;
}

.btn-store-lg {
  padding: 16px 36px;
  font-size: 1rem;
}

.btn-store-full {
  width: 100%;
}

/* Loading state */
.btn-store.loading {
  pointer-events: none;
  opacity: 0.7;
}


/* ─────────────────────────────────────────────────────────────
   9. CART SIDEBAR (OFF-CANVAS)
   ───────────────────────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: calc(var(--z-sidebar, 1100) - 1);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  height: 100dvh; /* Modern browsers: dynamic viewport */
  height: -webkit-fill-available; /* Safari fallback */
  max-height: 100%; /* Ensures it never exceeds the fixed top/bottom bounds */
  background: var(--surface-bg);
  z-index: var(--z-sidebar, 1100);
  display: flex;
  flex-direction: column;
  transition:
    right 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid var(--border-color);
}

.cart-sidebar--right {
  right: -420px;
  left: auto;
}

.cart-sidebar--left {
  left: -420px;
  right: auto;
  border-left: none;
  border-right: 1px solid var(--border-color);
}

.cart-sidebar--right.open {
  right: 0;
}

.cart-sidebar--left.open {
  left: 0;
}

.cart-sidebar__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-sidebar__title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-sidebar__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.cart-sidebar__close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.cart-sidebar__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  margin-bottom: 10px;
  transition: var(--transition);
  position: relative;
}

.cart-item__img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item__info {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-item__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 3px 0;
}

.cart-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.cart-item__price {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--price-color);
}

/* Quantity stepper */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  padding: 3px 6px;
  border: 1px solid var(--border-color);
}

.qty-stepper__btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
}

.qty-stepper__btn:hover {
  background: var(--accent);
  color: var(--btn-primary-text);
}

/* --- Desktop Nav & Dropdowns --- */
.store-nav-desktop {
  display: none;
  align-items: center;
  gap: 30px;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .store-nav-desktop {
    display: flex;
  }

  .store-header__hamburger {
    display: none !important;
  }
}

.store-nav-desktop .store-nav__link {
  color: var(--header-text, #ffffff);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: opacity 0.3s;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.store-nav-desktop .store-nav__link:hover {
  opacity: 0.8;
}

.store-nav__dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  right: 0;
  /* RTL alignment */
  background: rgba(var(--header-bg-rgb, 13, 13, 13), var(--glass-opacity, 0.9));
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  z-index: 100;
  padding: 10px 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.store-nav__dropdown:hover .dropdown-content {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-content a {
  color: var(--header-text, #fff);
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.dropdown-content a:hover {
  background-color: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
}



.qty-stepper__val {
  min-width: 28px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.cart-item__remove {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-item__remove:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Cart footer / summary */
.cart-sidebar__footer {
  border-top: 1px solid var(--border-color);
  padding: 20px 24px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.cart-summary-row.total {
  font-size: 1.05rem;
  font-weight: 800;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
  color: var(--price-color);
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.cart-empty i {
  font-size: 3rem;
  opacity: 0.3;
}


/* ─────────────────────────────────────────────────────────────
   10. FORMS & INPUTS
   ───────────────────────────────────────────────────────────── */
.store-form-group {
  margin-bottom: 20px;
}

.store-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.store-input,
.store-select,
.store-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-main);
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.store-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.store-input:focus,
.store-select:focus,
.store-textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.store-input.error {
  border-color: #ef4444;
}

.store-error-msg {
  color: #f87171;
  font-size: 0.75rem;
  margin-top: 4px;
}

.store-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%239CA3AF' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 12px;
  padding-left: 36px;
}


/* ─────────────────────────────────────────────────────────────
   11. TOAST NOTIFICATIONS
   ───────────────────────────────────────────────────────────── */
.store-toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-toast, 1300);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.store-toast {
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.store-toast.hide {
  animation: toastOut 0.3s ease forwards;
}

.store-toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.store-toast-msg {
  font-size: 0.875rem;
  font-weight: 600;
  flex: 1;
}

.store-toast--success {
  border-color: rgba(34, 197, 94, 0.4);
}

.store-toast--success .store-toast-icon {
  color: #22c55e;
}

.store-toast--error {
  border-color: rgba(239, 68, 68, 0.4);
}

.store-toast--error .store-toast-icon {
  color: #ef4444;
}

.store-toast--info {
  border-color: rgba(var(--accent-rgb), 0.4);
}

.store-toast--info .store-toast-icon {
  color: var(--accent);
}


/* ─────────────────────────────────────────────────────────────
   12. BADGES & LABELS
   ───────────────────────────────────────────────────────────── */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}

.store-badge-accent {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
}

.store-badge-success {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.store-badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.store-badge-info {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.store-badge-muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}


/* ─────────────────────────────────────────────────────────────
   13. EMPTY STATES
   ───────────────────────────────────────────────────────────── */
.store-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
  text-align: center;
  gap: 16px;
}

.store-empty__icon {
  font-size: 3.5rem;
  color: rgba(var(--accent-rgb), 0.25);
  margin-bottom: 8px;
}

.store-empty h3 {
  font-size: 1.15rem;
  color: var(--text-main);
}

.store-empty p {
  font-size: 0.875rem;
  max-width: 340px;
}


/* ─────────────────────────────────────────────────────────────
   14. BREADCRUMB
   ───────────────────────────────────────────────────────────── */
.store-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 16px 0;
  flex-wrap: wrap;
}

.store-breadcrumb a {
  color: var(--text-muted);
  transition: var(--transition);
}

.store-breadcrumb a:hover {
  color: var(--accent);
}

.store-breadcrumb span {
  color: var(--text-main);
  font-weight: 600;
}

.store-breadcrumb i {
  font-size: 0.6rem;
  opacity: 0.5;
}


/* ─────────────────────────────────────────────────────────────
   15. SECTION HEADERS
   ───────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.section-header--center {
  justify-content: center;
  text-align: center;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  position: relative;
  padding-right: 16px;
}

.section-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--accent);
  border-radius: 2px;
}

.section-header--center .section-title {
  padding-right: 0;
}

.section-header--center .section-title::before {
  display: none;
}

.section-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  transition: var(--transition);
  white-space: nowrap;
}

.section-link:hover {
  opacity: 0.8;
}


/* ─────────────────────────────────────────────────────────────
   16. PRODUCT DETAIL PAGE
   ───────────────────────────────────────────────────────────── */
.product-gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--card-bg);
}

.product-gallery__main {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-gallery:hover .product-gallery__main {
  transform: scale(1.03);
}

.product-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
}

.product-thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.product-thumb.active,
.product-thumb:hover {
  border-color: var(--accent);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Variant selectors */
.variant-group {
  margin-bottom: 20px;
}

.variant-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.variant-label strong {
  color: var(--accent);
  font-weight: 700;
}

.variant-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  outline-offset: 3px;
}

.color-swatch.active,
.color-swatch:hover {
  outline: 2.5px solid var(--accent);
}

.size-swatch {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.size-swatch.active,
.size-swatch:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.size-swatch:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}


/* ─────────────────────────────────────────────────────────────
   17. CART PAGE
   ───────────────────────────────────────────────────────────── */
.cart-page {
  padding: 28px 0 44px;
  overflow-x: clip;
}

.cart-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 24px;
  flex-wrap: wrap;
}

.cart-page-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.25;
}

.cart-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cart-page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

@media (min-width: 992px) {
  .cart-page-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: 24px;
  }
}

.cart-empty-state {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}

.cart-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
  font-size: 1.6rem;
}

.cart-empty-title {
  margin-bottom: 6px;
}

.cart-empty-desc {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cart-items-list {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cart-page-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  transition: var(--transition);
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-page-item:last-child {
  border-bottom: none;
}

.cart-page-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.cart-page-item__img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.cart-page-item__img--placeholder {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.cart-page-item__content {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-page-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cart-page-item__name {
  font-weight: 800;
  display: inline-block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cart-remove-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-remove-btn:hover {
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.cart-page-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cart-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  overflow: hidden;
  height: 42px;
}

.cart-qty-control .qty-btn {
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  color: var(--text-main);
  display: grid;
  place-items: center;
}

.cart-qty-control .qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cart-qty-control .qty-input {
  width: 64px;
  height: 42px;
  border: none;
  background: transparent;
  color: var(--text-main);
  text-align: center;
  font-weight: 800;
  -moz-appearance: textfield;
}

.cart-qty-control .qty-input::-webkit-outer-spin-button,
.cart-qty-control .qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-line-prices {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px 16px;
  flex-wrap: wrap;
  min-width: 0;
}

.cart-line-total {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--price-color);
}

.cart-summary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cart-summary__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.cart-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.cart-summary__row:last-child {
  border-bottom: none;
}

.order-summary-card.checkout-summary,
.order-summary-card.cart-summary {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}

.cart-summary__hint {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cart-items .is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────
   CHECKOUT PAGE
   ───────────────────────────────────────────────────────────── */
.checkout-page {
  padding: 24px 0 44px;
  overflow-x: clip;
}

.checkout-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 24px;
  flex-wrap: wrap;
}

.checkout-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.25;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

@media (min-width: 992px) {
  .checkout-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: 24px;
  }
}

.checkout-form-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 30px;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}

.checkout-form-card .store-input,
.checkout-form-card .store-select,
.checkout-form-card .store-textarea {
  border-radius: 12px;
  border-width: 2px;
}

.checkout-help {
  margin-top: 8px;
  line-height: 1.45;
}

.checkout-section-head {
  margin-bottom: 14px;
}

.checkout-section-title {
  margin-bottom: 6px;
  font-weight: 900;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.checkout-field {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
}

.checkout-field .form-label {
  margin-bottom: 8px;
}

.checkout-field .store-input,
.checkout-field .store-select,
.checkout-field .store-textarea {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.18);
}

.checkout-field:focus-within {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.06);
}

@media (min-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr 1fr;
  }

  .checkout-field--full {
    grid-column: 1 / -1;
  }
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.payment-method-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: var(--transition);
}

.payment-method-option:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.payment-method-option input[type="radio"]:checked+.payment-method-ui,
.payment-method-option:has(input[type="radio"]:checked) {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

.payment-method-ui {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payment-method-title {
  font-weight: 800;
  color: var(--text-main);
  font-size: 1rem;
}

.payment-method-desc {
  font-size: 0.85rem;
}

.checkout-submit-row {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-method-option input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.payment-method-option:has(input:checked) {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.10);
}

.payment-method-option input {
  margin-top: 3px;
}

.payment-method-option:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
}

.payment-method-ui {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.payment-method-title {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.payment-method-desc {
  font-size: 0.92rem;
  line-height: 1.45;
}

.checkout-submit-row {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

@media (max-width: 767.98px) {
  .checkout-form-card {
    padding: 16px;
    border-radius: 22px;
  }

  .checkout-grid {
    gap: 12px;
  }

  .payment-method-option {
    padding: 12px;
  }

  .order-summary-card.checkout-summary {
    position: static;
    top: auto;
  }
}

/* ─────────────────────────────────────────────────────────────
   SEARCH PAGE
   ───────────────────────────────────────────────────────────── */
.search-page {
  padding: 24px 0 44px;
  overflow-x: clip;
}

.search-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 18px;
}

.search-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
}

.search-hero__form {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex: 1 1 420px;
  justify-content: flex-end;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-input-wrap i {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrap .store-input {
  padding-right: 42px;
}

.search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0 18px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
}

.search-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-sort .store-select {
  min-width: 200px;
}

.search-pagination-wrap {
  margin-top: 24px;
}

@media (max-width: 767.98px) {
  .search-hero__form {
    flex: 1 1 100%;
    flex-direction: column;
  }

  .search-sort {
    width: 100%;
    justify-content: space-between;
  }

  .search-sort .store-select {
    width: 100%;
    min-width: 0;
  }
}

.order-summary-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  position: sticky;
  top: 80px;
  min-width: 0;
}


/* ─────────────────────────────────────────────────────────────
   18. CHECKOUT PAGE
   ───────────────────────────────────────────────────────────── */
.checkout-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 40px;
  overflow-x: auto;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.checkout-step__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.checkout-step__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.checkout-step.active .checkout-step__num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-primary-text);
}

.checkout-step.active .checkout-step__label {
  color: var(--accent);
}

.checkout-step.done .checkout-step__num {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #22c55e;
}

.checkout-divider {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  border-radius: 1px;
  min-width: 24px;
}

/* Payment method selection */
.payment-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 10px;
}

.payment-method:has(input:checked),
.payment-method.selected {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.payment-method input[type="radio"] {
  display: none;
}

.payment-method__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.payment-method__name {
  font-weight: 700;
  font-size: 0.92rem;
}

.payment-method__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* ─────────────────────────────────────────────────────────────
   19. CUSTOMER AUTH PAGES
   ───────────────────────────────────────────────────────────── */
.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.auth-card__logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
}

.auth-card__sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}


/* ─────────────────────────────────────────────────────────────
   20. FOOTER
   ───────────────────────────────────────────────────────────── */
.store-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 0;
  margin-top: 80px;
}

.store-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}

@media (max-width: 1024px) {
  .store-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .store-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.store-footer__brand-logo {
  height: 36px;
  margin-bottom: 16px;
}

.store-footer__desc {
  font-size: 0.85rem;
  color: var(--footer-text);
  line-height: 1.7;
  margin-bottom: 20px;
  opacity: 0.8;
}

.store-footer__social {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--footer-icons);
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-primary-text);
  transform: translateY(-2px);
}

.store-footer__heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--footer-text);
  margin-bottom: 18px;
  letter-spacing: 0.03em;
}

.store-footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-footer__links a {
  font-size: 0.83rem;
  color: var(--footer-text);
  opacity: 0.75;
  transition: var(--transition);
}

.store-footer__links a:hover {
  color: var(--accent);
  padding-right: 4px;
}

.store-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--footer-text);
  opacity: 0.85;
  margin-bottom: 14px;
  line-height: 1.5;
}

.store-footer__contact-item i {
  color: var(--footer-icons);
  width: 16px;
  text-align: center;
  margin-top: 4px; /* Align with first line of text */
}

.store-footer__bottom {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--footer-text);
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 8px;
}

.store-footer__payment-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-footer__payment-icons img {
  height: 22px;
  filter: grayscale(1) opacity(0.5);
  transition: var(--transition);
}

.store-footer__payment-icons img:hover {
  filter: none;
}


/* ─────────────────────────────────────────────────────────────
   21. LOADER / SKELETON
   ───────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.04) 25%,
      rgba(255, 255, 255, 0.08) 50%,
      rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.skeleton-img {
  aspect-ratio: 1/1;
}

.skeleton-line {
  height: 12px;
  margin: 10px 14px;
}

.skeleton-line-sm {
  height: 10px;
  margin: 6px 14px;
  width: 60%;
}

/* Full-page loader */
.store-page-loader {
  position: fixed;
  inset: 0;
  background: var(--page-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

.store-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}


/* ─────────────────────────────────────────────────────────────
   22. BACK-TO-TOP
   ───────────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--btn-primary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  box-shadow: var(--shadow-accent);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
}


/* ─────────────────────────────────────────────────────────────
   23. UTILITY CLASSES
   ───────────────────────────────────────────────────────────── */
.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

.d-none {
  display: none !important;
}

.d-block {
  display: block;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

.mt-4 {
  margin-top: 4px;
}

/* Spacing aliases (product & forms; Bootstrap-like names) */
.pt-4 {
  padding-top: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.w-100 {
  width: 100%;
}

.me-2 {
  margin-inline-end: 0.5rem;
}

.ms-2 {
  margin-inline-start: 0.5rem;
}

.form-label {
  display: block;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}

.p-16 {
  padding: 16px;
}

.p-24 {
  padding: 24px;
}

.p-32 {
  padding: 32px;
}

.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-full {
  border-radius: 50px;
}

.border {
  border: 1px solid var(--border-color);
}

.glass-surface {
  background: rgba(var(--card-bg-rgb, 26, 26, 26), 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin: 24px 0;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}


/* ─────────────────────────────────────────────────────────────
   24. MEDIA QUERIES
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .store-header__search {
    display: none;
  }
}

@media (max-width: 768px) {

  .store-section {
    padding: 36px 0;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .slide-overlay {
    padding: 0 24px;
  }

  .slide-content p {
    display: none;
  }

  .cart-sidebar {
    max-width: 100%;
  }

  .cart-sidebar--right {
    right: -100%;
  }

  .cart-sidebar--left {
    left: -100%;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .store-footer {
    padding: 40px 0 0;
  }
}

@media (max-width: 480px) {

  .section-header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  .checkout-steps {
    gap: 2px;
  }

  .checkout-step__label {
    display: none;
  }

  .cart-page-item {
    flex-direction: column;
  }

  .cart-page-item__img {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
  }
}


/* ─────────────────────────────────────────────────────────────
   25. PROMO BANNERS (Floating Style)
   ───────────────────────────────────────────────────────────── */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.promo-banner {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.promo-banner:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.promo-banner__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-banner:hover .promo-banner__bg {
  transform: scale(1.1);
}

.promo-banner__content {
  position: absolute;
  inset: 0;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.promo-banner__content .btn-store {
  pointer-events: auto;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.promo-banner__content h3 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.1;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.promo-banner__content p {
  font-size: 0.95rem;
  margin-bottom: 24px;
  color: #eee;
  max-width: 300px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .promo-banner {
    aspect-ratio: 16 / 9;
  }

  .promo-banner__content {
    padding: 24px;
  }

  .promo-banner__content h3 {
    font-size: 1.4rem;
  }

  .promo-banner__content p {
    font-size: 0.85rem;
    margin-bottom: 15px;
  }
}


/* ─────────────────────────────────────────────────────────────
   MOBILE HEADER OPTIMIZATION (v3.0 — Unified All Phones)
   ─────────────────────────────────────────────────────────────
   Single breakpoint at 991.98px matches when desktop nav appears
   at 992px. Uses clamp() for fluid sizing across ALL phone
   screen widths (320px → 991px) so the header looks consistent
   on every device.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .store-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(var(--header-bg-rgb), 0.95);
  }

  .store-header__inner {
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    padding: 10px clamp(10px, 3vw, 20px);
    gap: 6px 0;
  }

  /* ── Row 1, Column 1: Hamburger ── */
  .store-header__col-start {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }

  .store-header__hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(36px, 10vw, 44px);
    height: clamp(36px, 10vw, 44px);
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    padding: 0;
    margin: 0;
    color: var(--header-text);
    border-radius: 50%;
    transition: background 0.2s ease;
  }

  .store-header__hamburger:active {
    background: rgba(var(--accent-rgb), 0.12);
  }

  /* ── Row 1, Column 2: Logo (centered) ── */
  .store-header__col-center {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    overflow: hidden;
  }

  .store-header__logo {
    max-width: 100%;
  }

  .store-header__logo img {
    height: clamp(32px, 9vw, 50px);
    width: auto;
    max-width: clamp(80px, 28vw, 160px);
    object-fit: contain;
  }

  .store-header__logo-name {
    font-size: clamp(0.82rem, 3vw, 1.1rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ── Row 1, Column 3: Action buttons ── */
  .store-header__col-end {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(2px, 1vw, 8px);
  }

  .store-header__btn {
    width: clamp(32px, 9vw, 42px);
    height: clamp(32px, 9vw, 42px);
    font-size: clamp(0.82rem, 2.5vw, 1rem);
    flex-shrink: 0;
  }

  .store-header__btn--lang {
    font-size: clamp(0.65rem, 2vw, 0.82rem);
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  .store-header__btn .badge-count {
    width: clamp(14px, 4vw, 18px);
    height: clamp(14px, 4vw, 18px);
    font-size: clamp(0.5rem, 1.5vw, 0.6rem);
    top: 1px;
    right: 1px;
  }

  /* ── Row 2: Search bar (full width) ── */
  .store-header__search {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 100%;
    margin-top: 2px;
    display: block !important;
  }

  .store-header__search input {
    height: clamp(38px, 10vw, 44px);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    padding: 8px 16px 8px 40px;
  }

  .store-header__search-icon {
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    left: 14px;
  }

  /* ── Hide desktop nav ── */
  .store-nav-desktop {
    display: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   ANIMATIONS / OTHER
   ───────────────────────────────────────────────────────────── */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

/* ─────────────────────────────────────────────────────────────
   26. CATEGORIES SLIDER (Premium Cards)
   ───────────────────────────────────────────────────────────── */
.category-scroll-section {
  padding: 40px 0;
}

.category-card {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.category-card__img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.category-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.category-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--card-bg), var(--surface-bg));
}

.category-card__placeholder i {
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.6;
}

.category-card__overlay {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
  transition: background 0.4s ease;
  z-index: 2;
  pointer-events: none;
}

.category-card__name {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease;
}

/* Hover Effects */
.category-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(var(--accent-rgb), 0.3);
}

.category-card:hover .category-card__img {
  transform: scale(1.15);
}

.category-card:hover .category-card__overlay {
  background: linear-gradient(to top, rgba(var(--accent-rgb), 0.8) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
}

.category-card:hover .category-card__name {
  transform: translateY(-5px);
}

@media (max-width: 768px) {
  .category-card {
    border-radius: 18px;
  }

  .category-card__overlay {
    padding: 12px;
  }

  .category-card__name {
    font-size: 0.9rem;
  }

  .category-scroll-section {
    padding: 30px 0;
  }
}

/* ── Cart "add" micro-animation ── */
@keyframes addedPop {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.22);
  }

  70% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
}

.btn-added {
  animation: addedPop 0.45s ease forwards;
}

/* ─────────────────────────────────────────────────────────────
   27. BRANDS SLIDER (Premium Glass Cards)
   ───────────────────────────────────────────────────────────── */
.brands-section {
  background: var(--surface-bg);
  border-top: 1px solid var(--border-color);
  padding: 60px 0;
}

.brand-card {
  display: block;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand-card__inner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 25px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  backdrop-filter: blur(10px);
  height: 100%;
  transition: all 0.4s ease;
}

.brand-card__img-wrap {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
}

.brand-card__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-card__name {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

/* Hover State */
.brand-card:hover {
  transform: translateY(-10px);
}

.brand-card:hover .brand-card__inner {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: var(--accent);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.brand-card:hover .brand-card__img-wrap {
  transform: scale(1.1) rotate(3deg);
  box-shadow: 0 12px 25px rgba(var(--accent-rgb), 0.4);
}

@media (max-width: 768px) {
  .brands-section {
    padding: 40px 0;
  }

  .brand-card__inner {
    padding: 15px 10px;
  }

  .brand-card__img-wrap {
    width: 60px;
    height: 60px;
    border-radius: 12px;
  }

  .brand-card__name {
    font-size: 0.8rem;
  }
}

.brands-pagination {
  margin-top: 30px !important;
  position: relative !important;
  bottom: 0 !important;
}

.brands-pagination .swiper-pagination-bullet-active {
  background: var(--accent) !important;
}

/* ─────────────────────────────────────────────────────────────
   PRODUCT CARD VARIATIONS & META STYLING
   ───────────────────────────────────────────────────────────── */
.product-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.product-card__brand {
  font-size: 0.70rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card__variations {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

.product-card__colors,
.product-card__sizes {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  display: inline-block;
}

.color-swatch-more {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 14px;
  margin-left: 2px;
}

.size-badge {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: monospace;
  font-weight: bold;
}

/* ─────────────────────────────────────────────────────────────
   SHOP PAGE & FILTERS STYLING
   ───────────────────────────────────────────────────────────── */
@media (min-width: 992px) {
  .d-md-none {
    display: none !important;
  }
}

.shop-page {
  padding: 30px 0;
  background-color: var(--bg-body);
  overflow-x: clip;
  max-width: 100%;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 0.85rem;
  margin-bottom: 25px;
  color: var(--text-muted);
  row-gap: 6px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .separator {
  font-size: 0.70rem;
}

.breadcrumb .current {
  color: var(--text-main);
  font-weight: 600;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.search-results-title,
.category-header {
  margin-bottom: 25px;
}

.search-results-title h2,
.category-header h2 {
  font-size: clamp(1.05rem, 4vw, 1.5rem);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.shop-layout {
  display: flex;
  flex-wrap: nowrap;
  gap: 30px;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
}

.shop-sidebar-wrapper {
  width: 260px;
  flex-shrink: 0;
}

.shop-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 100px;
  box-sizing: border-box;
}

.shop-sidebar__body {
  min-width: 0;
}

.shop-sidebar__footer {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.filter-group {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px dashed var(--border-color);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 18px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.filter-search-box {
  position: relative;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.filter-search-box .store-input {
  width: 100%;
  padding-right: 40px;
  height: 44px;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  /* RTL */
  padding-left: 12px;
}

.filter-search-box:focus-within {
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.12);
}

.filter-search-box .store-input:focus {
  border-color: var(--accent);
  background: #fff;
}

[dir="ltr"] .filter-search-box .store-input {
  padding-left: 40px;
  padding-right: 12px;
}

.filter-search-box i {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-search-box:focus-within i {
  color: var(--accent);
}

[dir="ltr"] .filter-search-box i {
  left: 14px;
  right: auto;
}

.custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  position: relative;
  min-width: 0;
}

.custom-checkbox.filter-option-row {
  align-items: center;
  gap: 12px;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Category specifically uses Radio -> Circle */
.custom-checkbox input[type="radio"]~.checkmark {
  border-radius: 50%;
}

.custom-checkbox:hover .checkmark {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
}

.custom-checkbox:focus-within .checkmark {
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 2px rgba(var(--accent-rgb), 0.25);
}

.custom-checkbox input:checked~.checkmark {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2);
}

.custom-checkbox input:checked~.checkmark:after {
  content: '';
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* Radio check style (circle dot) */
.custom-checkbox input[type="radio"]:checked~.checkmark:after {
  content: '';
  width: 10px;
  height: 10px;
  background: #fff;
  border: none;
  border-radius: 50%;
  transform: none;
}

.label-text {
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  gap: 8px;
}

.label-text .filter-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

.label-text small {
  color: var(--text-muted);
  flex-shrink: 0;
}

.filter-name--mono {
  font-family: 'Cairo', ui-monospace, monospace;
  font-weight: 700;
}

/* Color row: checkmark + swatch + name (shop filters) */
.filter-colors-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filter-color-row {
  align-items: center;
}

.color-swatch-inline {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 2px 5px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.filter-color-row input:checked~.color-swatch-inline {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px var(--card-bg, #1a1a1a),
    0 0 0 4px var(--accent);
  transform: scale(1.05);
}

.filter-sizes-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filter-colors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-checkbox {
  cursor: pointer;
  position: relative;
  border-radius: 50%;
}

.color-checkbox input {
  position: absolute;
  opacity: 0;
}

.color-swatch-filter {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
  box-sizing: border-box;
}

.color-checkbox:hover .color-swatch-filter {
  border-color: rgba(255, 255, 255, 0.75);
}

.color-checkbox input:focus-visible~.color-swatch-filter {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.color-checkbox input:checked~.color-swatch-filter {
  border-color: var(--text-main);
  transform: scale(1.06);
  box-shadow:
    0 0 0 2px var(--card-bg, #1a1a1a),
    0 0 0 4px var(--accent);
}

.filter-sizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-checkbox {
  cursor: pointer;
  position: relative;
}

.size-checkbox input {
  position: absolute;
  opacity: 0;
}

.size-badge-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 35px;
  padding: 0 10px;
  border-radius: 6px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.32);
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: monospace;
  font-weight: bold;
  transition: var(--transition);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.size-checkbox:hover .size-badge-filter {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.size-checkbox input:focus-visible~.size-badge-filter {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.size-checkbox input:checked~.size-badge-filter {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: none;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-input {
  width: 100%;
  text-align: center;
  padding: 8px;
  font-size: 0.9rem;
}

.shop-content {
  flex: 1;
  min-width: 0;
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  padding: 15px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.shop-toolbar__left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  min-width: 0;
}

.results-count {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.shop-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.shop-toolbar__right select {
  width: auto;
  min-width: 150px;
  max-width: 100%;
  padding: 10px 15px;
  background: var(--surface-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.shop-toolbar__right select:hover,
.shop-toolbar__right select:focus {
  border-color: var(--accent);
}

.shop-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.shop-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding: 0 4px;
  max-width: 100%;
}

.shop-pagination .page-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.shop-pagination .page-link:hover,
.shop-pagination .page-link.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.shop-pagination .page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 40px;
  padding: 0 6px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1rem;
  user-select: none;
  pointer-events: none;
}

/* Offcanvas Filters for Mobile */
@media (max-width: 991px) {
  .shop-page {
    padding: 16px 0 28px;
  }

  .shop-layout {
    flex-direction: column;
    gap: 0;
  }

  .shop-content {
    width: 100%;
    max-width: 100%;
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
  }

  .shop-toolbar__left {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .shop-toolbar__left .btn-store {
    width: 100%;
    justify-content: center;
  }

  .shop-toolbar__right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .shop-toolbar__right label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
  }

  .shop-toolbar__right select {
    width: 100%;
    flex: none;
    max-width: none;
  }

  .shop-sidebar-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, calc(100vw - 12px));
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 1050;
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom, 0);
    transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  [dir="ltr"] .shop-sidebar-wrapper {
    right: auto;
    left: 0;
    transform: translateX(-105%);
  }

  .shop-sidebar-wrapper.open {
    transform: translateX(0);
  }

  [dir="ltr"] .shop-sidebar-wrapper.open {
    transform: translateX(0);
  }

  .shop-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    border: none;
    overflow: hidden;
    background: var(--card-bg) !important;
    box-shadow: var(--shadow-lg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .shop-sidebar__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px 8px;
    -webkit-overflow-scrolling: touch;
    background: var(--card-bg);
  }

  /* صفوف لمس أوضح + مربع تحديد بجانب كل خيار */
  .shop-sidebar .filter-option-row {
    min-height: 48px;
    padding: 10px 12px;
    margin-bottom: 8px;
    margin-inline: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
  }

  .shop-sidebar .filter-option-row:active {
    background: rgba(255, 255, 255, 0.07);
  }

  .shop-sidebar .filter-option-row .checkmark {
    width: 24px;
    height: 24px;
  }

  .shop-sidebar .filter-color-row .filter-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.35;
  }

  .shop-sidebar .filter-options--scroll {
    max-height: min(42dvh, 300px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-inline-end: 4px;
    margin-inline-end: -2px;
    scrollbar-width: thin;
  }

  .shop-sidebar .filter-title {
    font-size: 0.95rem;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .shop-sidebar .filter-group {
    margin-bottom: 18px;
    padding-bottom: 18px;
  }

  .shop-sidebar__footer {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid var(--border-color);
    background: var(--card-bg) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .filter-group:first-child {
    padding-top: 0;
  }

  .price-inputs {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .price-inputs>span {
    display: none;
  }

  .shop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .shop-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .shop-sidebar__header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 16px 18px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .shop-sidebar__close {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
  }

  .shop-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 576px) {
  .shop-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ─── Mobile Product Card Responsive Overrides ─── */
@media (max-width: 480px) {
  .product-card__body {
    padding: 10px;
  }

  .product-card__name {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
  }

  .product-card__category {
    font-size: 0.62rem;
    margin-bottom: 2px;
  }

  .product-card__meta {
    margin-bottom: 2px;
  }

  .product-card__brand {
    font-size: 0.62rem;
  }

  .product-card__rating {
    margin-bottom: 6px;
  }

  .product-card__stars {
    font-size: 0.6rem;
  }

  .product-card__rating-count {
    font-size: 0.6rem;
  }

  .product-card__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .product-card__price-wrap {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .product-card__price {
    font-size: 0.9rem;
  }

  .product-card__price-old {
    font-size: 0.68rem;
  }

  .product-card__add-btn {
    width: 100%;
    height: 34px;
    border-radius: 999px;
    font-size: 0.8rem;
  }

  .product-card__add-btn--select {
    width: 100%;
    min-width: unset;
    height: 34px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .product-card__variations {
    margin-top: 4px;
    margin-bottom: 4px;
    padding-top: 4px;
    gap: 4px;
  }

  .product-card__colors,
  .product-card__sizes {
    gap: 3px;
  }

  .color-swatch {
    width: 12px;
    height: 12px;
  }

  .size-badge {
    font-size: 0.58rem;
    padding: 0px 4px;
  }

  .product-card__badge {
    top: 6px;
    right: 6px;
    padding: 2px 7px;
    font-size: 0.6rem;
  }

  .product-card__action-btn {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }
}

/* ─── Extra small screens (iPhone SE, etc.) ─── */
@media (max-width: 374px) {
  .product-card__body {
    padding: 8px;
  }

  .product-card__name {
    font-size: 0.75rem;
  }

  .product-card__price {
    font-size: 0.82rem;
  }

  .product-card__add-btn,
  .product-card__add-btn--select {
    height: 32px;
    font-size: 0.7rem;
  }
}

/* ─────────────────────────────────────────────────────────────
   ► PRODUCT PAGE STYLES (Appended)
   ───────────────────────────────────────────────────────────── */

.product-page {
  overflow-x: clip;
}

.product-page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 40px;
  min-width: 0;
  width: 100%;
}

.product-gallery-wrapper,
.product-info-panel {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 992px) {
  .product-page-layout {
    grid-template-columns: minmax(0, 55%) minmax(0, 45%);
    gap: 40px;
    align-items: start;
  }

  /* Gallery sticks beside info on large screens only */
  .product-gallery-wrapper {
    position: sticky;
    top: 92px;
  }
}

.pg-main-swiper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-bg);
  aspect-ratio: 1/1;
  position: relative;
}

.pg-main-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
  cursor: zoom-in;
}

.pg-main-slide:hover img {
  transform: scale(1.08);
}

.pg-thumbs-swiper {
  margin-top: 15px;
}

.pg-thumb-slide {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--surface-bg);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  opacity: 0.6;
}

.pg-thumb-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-slide-thumb-active {
  border-color: var(--accent);
  opacity: 1;
}

/* Info Panel */
.product-info-panel h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pip-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.pip-rating {
  color: var(--accent);
  display: inline-flex;
  gap: 4px;
}

.pip-price-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

.pip-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--price-color);
  line-height: 1;
}

.pip-price-old {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-inline-start: 10px;
}

.pip-discount-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-inline-start: 10px;
  vertical-align: middle;
}

.pip-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.pip-status--in {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.pip-status--out {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Variant Selectors */
.variant-section {
  margin-bottom: 25px;
}

.variant-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}

.variant-value-display {
  color: var(--accent);
  font-weight: 600;
}

.colors-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-color {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: all 0.2s ease;
  position: relative;
}

.btn-color:hover {
  transform: scale(1.1);
}

.btn-color.selected {
  outline-color: var(--accent);
  transform: scale(1.1);
}

.btn-color.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.sizes-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-size {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--surface-bg);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
  text-align: center;
}

.btn-size:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.05);
}

.btn-size.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--btn-primary-text);
}

.btn-size.disabled {
  opacity: 0.4;
  text-decoration: line-through;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
}

/* Action Area */
.pip-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  align-items: stretch;
}

.qty-input-group {
  display: flex;
  align-items: center;
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 50px;
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.qty-input {
  width: 50px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-add-cart {
  flex: 1;
  height: 50px;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
}

.btn-icon-square {
  width: 50px;
  height: 50px;
  border: 1px solid var(--border-color);
  background: var(--surface-bg);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn-icon-square:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

.pip-whatsapp {
  width: 100%;
  background: rgba(37, 211, 102, 0.1);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.2);
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  transition: var(--transition);
  text-decoration: none;
  margin-bottom: 20px;
}

.pip-whatsapp:hover {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}

/* Tabs for description and reviews */
.product-tabs {
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
}

.nav-tabs-custom {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs-custom::-webkit-scrollbar {
  display: none;
}

.nav-tab-label {
  padding: 10px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab-label.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-pane.active {
  display: block;
}

.description-content {
  color: var(--text-main);
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Reviews Section */
.reviews-breakdown {
  display: flex;
  gap: 40px;
  background: var(--surface-bg);
  padding: 30px;
  border-radius: var(--radius-md);
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.rb-overall {
  text-align: center;
  min-width: 150px;
}

.rb-overall .rating-num {
  font-size: 4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.rb-overall .stars {
  color: var(--accent);
  font-size: 1.2rem;
  margin: 10px 0;
}

.rb-bars {
  flex: 1;
  min-width: 250px;
}

.rb-bar-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 8px;
}

.rb-star-label {
  width: 45px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.rb-progress-bg {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.rb-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}

.rb-count {
  width: 30px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
}

.review-card {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

.review-card:last-child {
  border-bottom: none;
}

.rc-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rc-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.rc-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rc-stars {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.rc-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.rc-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Review Form */
.review-form-box {
  background: var(--surface-bg);
  padding: 30px;
  border-radius: var(--radius-md);
  margin-top: 40px;
  border: 1px solid var(--border-color);
}

.review-form-box h3 {
  margin-bottom: 20px;
}

.star-rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}

.star-rating-input input {
  display: none;
}

.star-rating-input label {
  color: rgba(255, 255, 255, 0.2);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.star-rating-input label:hover,
.star-rating-input label:hover~label,
.star-rating-input input:checked~label {
  color: var(--accent);
}

.product-info-panel {
  min-width: 0;
}

.pip-price-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pip-stock-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pip-stock-count,
.qty-help-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.qty-help-text {
  margin-top: -12px;
  margin-bottom: 20px;
}

.nav-tab-label {
  border: none;
  background: transparent;
}

@media (max-width: 991.98px) {
  .product-gallery-wrapper {
    position: static;
    top: auto;
  }
}

@media (max-width: 767.98px) {
  .product-page {
    overflow-x: hidden;
  }

  .store-breadcrumb {
    gap: 6px;
    font-size: 0.78rem;
    line-height: 1.5;
    flex-wrap: wrap;
  }

  .store-breadcrumb a,
  .store-breadcrumb .current {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .product-page-layout {
    gap: 20px;
    margin-bottom: 28px;
  }

  .pip-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pip-price-line {
    width: 100%;
  }

  .pip-price {
    font-size: clamp(1.35rem, 6vw, 1.85rem);
  }

  .pg-main-swiper {
    border-radius: var(--radius-md);
  }

  .product-info-panel h1 {
    font-size: 1.45rem;
    line-height: 1.45;
  }

  .pip-price-box,
  .reviews-breakdown,
  .review-form-box {
    padding: 18px;
  }

  .variant-title {
    gap: 8px;
    align-items: flex-start;
    flex-direction: column;
  }

  .colors-grid,
  .sizes-grid {
    gap: 8px;
  }

  .btn-size {
    min-width: 52px;
    padding: 8px 12px;
  }

  .pip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
  }

  .pip-actions .qty-input-group {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }

  .qty-input {
    width: 100%;
    min-width: 0;
    flex: 1;
  }

  .pip-actions .btn-add-cart {
    flex: 1 1 auto;
    min-width: 0;
  }

  .pip-actions .btn-icon-square {
    flex: 0 0 50px;
  }

  .nav-tabs-custom {
    gap: 18px;
    margin-bottom: 20px;
  }

  .nav-tab-label {
    font-size: 1rem;
    padding-bottom: 12px;
  }

  .description-content {
    font-size: 0.98rem;
    line-height: 1.9;
    word-break: break-word;
  }

  .reviews-breakdown {
    gap: 20px;
  }

  .rb-overall {
    min-width: 100%;
  }

  .rb-overall .rating-num {
    font-size: 3rem;
  }

  .rb-bars {
    min-width: 100%;
  }

  .rb-bar-row {
    gap: 10px;
  }

  .rb-star-label {
    width: 52px;
    font-size: 0.82rem;
  }

  .rb-count {
    width: 24px;
    font-size: 0.8rem;
  }

  .rc-header {
    gap: 8px;
    align-items: flex-start;
    flex-direction: column;
  }

  .rc-date,
  .rc-text {
    word-break: break-word;
  }
}

/* Product Page Refresh */
.pg-gallery-shell {
  position: relative;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.18), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow-md);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

.pg-gallery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.pg-gallery-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.pg-gallery-subtitle {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.pg-gallery-counter {
  min-width: 74px;
  padding: 8px 12px;
  border-radius: 14px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.pg-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.product-page .pg-stage .swiper,
.product-page .pg-thumbs-swiper {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.pg-main-swiper {
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(var(--accent-rgb), 0.12), transparent 55%),
    rgba(255, 255, 255, 0.04);
  aspect-ratio: 1 / 1;
}

.pg-main-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.pg-main-media {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg-main-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.pg-main-slide:hover img {
  transform: scale(1.04);
}

.pg-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(13, 13, 13, 0.72);
  color: #fff;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.pg-nav-btn:hover {
  background: var(--accent);
  color: var(--btn-primary-text);
}

.pg-nav-btn.is-hidden {
  display: none;
}

.pg-nav-btn--prev {
  right: 16px;
}

.pg-nav-btn--next {
  left: 16px;
}

.pg-main-pagination {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.pg-main-pagination.is-hidden {
  display: none;
}

.pg-main-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.35);
  opacity: 1;
}

.pg-main-pagination .swiper-pagination-bullet-active {
  width: 24px;
  border-radius: 999px;
  background: var(--accent);
}

.pg-thumbs-swiper {
  margin-top: 16px;
  padding-bottom: 4px;
}

.pg-thumb-slide {
  height: auto;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0.75;
  transition: var(--transition);
}

.pg-thumb-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-slide-thumb-active.pg-thumb-slide {
  border-color: var(--accent);
  opacity: 1;
  transform: translateY(-2px);
}

.pip-price-box,
.tab-panel-card,
.review-form-box,
.product-related-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.pip-status--pending {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.pip-outage-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
  border-radius: 16px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
  color: #fecaca;
}

.btn-color--text {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 700;
}

.btn-color--text span {
  pointer-events: none;
}

.btn-color.is-unavailable,
.btn-size.is-unavailable {
  position: relative;
}

.btn-color.is-unavailable::after,
.btn-size.is-unavailable::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 72%;
  height: 2px;
  background: rgba(239, 68, 68, 0.9);
  transform: translate(-50%, -50%) rotate(-28deg);
}

.btn-size.is-unavailable {
  color: var(--text-muted);
  border-color: rgba(239, 68, 68, 0.3);
}

.qty-btn:disabled,
.qty-input:disabled,
.btn-add-cart:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.product-tabs {
  margin-top: 44px;
}

.product-tabs-shell {
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

.nav-tabs-custom {
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  margin-bottom: 18px;
}

.nav-tab-label {
  border: none;
  background: transparent;
  border-radius: 14px;
  padding: 12px 18px;
  flex: 1 1 auto;
  text-align: center;
}

.nav-tab-label.active {
  background: rgba(var(--accent-rgb), 0.14);
  border-bottom-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.28);
}

.tab-panel-card {
  padding: 26px;
  border-radius: 24px;
}

.reviews-breakdown {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 24px;
}

.review-form-box {
  margin-top: 22px;
}

.product-related-section {
  margin-top: 48px;
  padding: 24px;
  border-radius: 28px;
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}

.section-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.products-swiper-controls {
  display: flex;
  gap: 10px;
}

.products-swiper-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  transition: var(--transition);
}

.products-swiper-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.products-swiper-btn.is-hidden {
  display: none;
}

.products-swiper {
  overflow: hidden;
}

.products-swiper-pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.products-swiper-pagination.is-hidden {
  display: none;
}

.products-swiper-pagination .swiper-pagination-bullet {
  width: 9px;
  height: 9px;
  opacity: 1;
  background: rgba(255, 255, 255, 0.28);
}

.products-swiper-pagination .swiper-pagination-bullet-active {
  background: var(--accent);
}

@media (max-width: 991.98px) {
  .product-gallery-wrapper {
    position: static;
    top: auto;
  }
}

@media (max-width: 767.98px) {

  .pg-gallery-shell,
  .product-tabs-shell,
  .product-related-section {
    padding: 14px;
    border-radius: 22px;
  }

  .pg-gallery-head {
    align-items: center;
  }

  .pg-gallery-subtitle {
    font-size: 0.84rem;
  }

  .pg-gallery-counter {
    min-width: 62px;
    font-size: 0.82rem;
  }

  .pg-main-swiper {
    border-radius: 20px;
  }

  .pg-main-slide {
    padding: 10px;
  }

  .pg-nav-btn {
    width: 40px;
    height: 40px;
  }

  .nav-tabs-custom {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .nav-tab-label {
    flex: 0 0 auto;
    min-width: 150px;
  }

  .tab-panel-card,
  .review-form-box {
    padding: 18px;
    border-radius: 18px;
  }

  .product-related-section .section-header {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }
}

/* ─────────────────────────────────────────────────────────────
   FOUC PREVENTION (Flash of Unstyled Content)
   Prevents images and sliders from showing full-size
   before Swiper JS initializes.
   ───────────────────────────────────────────────────────────── */

/* 1. All Swiper containers: hide overflow and limit height before init */
.swiper:not(.swiper-initialized) {
  overflow: hidden;
  max-height: 400px;
}

.swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
}

.swiper:not(.swiper-initialized) .swiper-slide {
  flex-shrink: 0;
  overflow: hidden;
}

/* 2. Category slider: constrain before init */
#categoriesSwiper:not(.swiper-initialized) {
  max-height: 280px;
}

#categoriesSwiper:not(.swiper-initialized) .swiper-slide {
  width: 240px;
  max-width: 240px;
}

/* 3. Product swipers (best sellers, latest): constrain */
#bestSellersSwiper:not(.swiper-initialized),
#latestProductsSwiper:not(.swiper-initialized) {
  max-height: 420px;
}

#bestSellersSwiper:not(.swiper-initialized) .swiper-slide,
#latestProductsSwiper:not(.swiper-initialized) .swiper-slide {
  width: 260px;
  max-width: 260px;
}

/* 4. Brands slider: constrain */
#brandsSwiper:not(.swiper-initialized) {
  max-height: 140px;
}

#brandsSwiper:not(.swiper-initialized) .swiper-slide {
  width: 150px;
  max-width: 150px;
}

/* 5. Hero slider: no vertical stack */
.main-hero-swiper:not(.swiper-initialized) {
  max-height: 500px;
}

.main-hero-swiper:not(.swiper-initialized) .swiper-slide {
  display: none;
}

.main-hero-swiper:not(.swiper-initialized) .swiper-slide:first-child {
  display: block;
}

/* 6. Smooth fade-in for all store sections */
.store-section {
  opacity: 0;
  transform: translateY(20px);
  animation: sectionFadeIn 0.5s ease forwards;
}

@keyframes sectionFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered delays for sequential sections */
.store-section:nth-child(1) { animation-delay: 0.05s; }
.store-section:nth-child(2) { animation-delay: 0.1s; }
.store-section:nth-child(3) { animation-delay: 0.15s; }
.store-section:nth-child(4) { animation-delay: 0.2s; }
.store-section:nth-child(5) { animation-delay: 0.25s; }
.store-section:nth-child(6) { animation-delay: 0.3s; }

/* 7. Lazy-load images: ensure visibility */
.product-card__img,
.category-card__img,
.brand-card__img {
  transition: transform 0.4s ease;
}


/* 8. Prevent body CLS during page load */
body {
  overflow-x: hidden;
}


/* ─────────────────────────────────────────────────────────────
   30. BLOG MODULE
   ───────────────────────────────────────────────────────────── */

/* Blog Hero */
.blog-hero {
  padding: 40px 0 30px;
  text-align: center;
}
.blog-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 8px;
}
.blog-hero__subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto 12px;
}
.blog-hero__count {
  display: inline-block;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Blog Layout */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
}
@media (max-width: 991px) {
  .blog-layout { grid-template-columns: 1fr; }
}

/* Blog Cards Grid */
.blog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.blog-cards--related {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Blog Card */
.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.blog-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.blog-card__image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card__image img {
  transform: scale(1.05);
}
.blog-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
  opacity: 0.3;
}
.blog-card__category {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(var(--accent-rgb), 0.85);
  color: var(--btn-primary-text);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.blog-card__featured {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,193,7,0.9);
  color: #000;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.blog-card__body {
  padding: 18px;
}
.blog-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__excerpt {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__meta {
  display: flex;
  gap: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}
.blog-card__meta i {
  margin-left: 4px;
}

/* Blog Empty State */
.blog-empty {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}
.blog-empty i {
  font-size: 3rem;
  color: var(--text-muted);
  opacity: 0.3;
  margin-bottom: 16px;
}
.blog-empty h3 {
  color: var(--text-main);
  margin-bottom: 8px;
}
.blog-empty p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Blog Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}
.blog-pagination__btn,
.blog-pagination__num {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
}
.blog-pagination__btn:hover,
.blog-pagination__num:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.blog-pagination__num.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-primary-text);
  font-weight: 700;
}

/* ── Blog Article (Single Post) ───────────────────────────── */
.blog-article {
  max-width: 100%;
  min-width: 0;
}
.blog-article__hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  aspect-ratio: 16/8;
}
.blog-article__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-article__header {
  margin-bottom: 30px;
}
.blog-article__category {
  display: inline-block;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 12px;
  transition: var(--transition);
}
.blog-article__category:hover {
  background: rgba(var(--accent-rgb), 0.2);
}
.blog-article__title {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 14px;
}
.blog-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.blog-article__meta i {
  margin-left: 5px;
  color: var(--accent);
  opacity: 0.7;
}

/* Article Content */
.blog-article__content {
  color: var(--text-main);
  font-size: 1.05rem;
  line-height: 2;
  margin-bottom: 30px;
}
.blog-article__content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 30px 0 14px;
  color: var(--text-main);
}
.blog-article__content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 24px 0 10px;
}
.blog-article__content p {
  margin-bottom: 16px;
}
.blog-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 16px 0;
}
.blog-article__content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-article__content a:hover {
  opacity: 0.8;
}
.blog-article__content blockquote {
  border-right: 4px solid var(--accent);
  padding: 16px 24px;
  margin: 20px 0;
  background: rgba(var(--accent-rgb), 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}
.blog-article__content ul, .blog-article__content ol {
  padding-right: 24px;
  margin-bottom: 16px;
}
.blog-article__content li {
  margin-bottom: 6px;
}
.blog-article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.blog-article__content table th,
.blog-article__content table td {
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  text-align: right;
}
.blog-article__content table th {
  background: rgba(255,255,255,0.05);
  font-weight: 700;
}

/* Tags */
.blog-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
}
.blog-article__tags > i {
  color: var(--text-muted);
  margin-left: 8px;
}
.blog-tag {
  display: inline-block;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  text-decoration: none;
  transition: var(--transition);
}
.blog-tag:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* Share Buttons */
.blog-article__share {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}
.blog-article__share-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}
.blog-share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.blog-share-btn:hover { transform: scale(1.1); }
.blog-share-btn--fb { background: #1877f2; }
.blog-share-btn--tw { background: #1da1f2; }
.blog-share-btn--wa { background: #25d366; }
.blog-share-btn--li { background: #0a66c2; }
.blog-share-btn--copy { background: rgba(255,255,255,0.1); border: 1px solid var(--border-color); }

/* Related Products in Article */
.blog-related-products {
  margin: 30px 0;
}
.blog-related-products h3,
.blog-related-posts h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
}
.blog-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.blog-product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s ease;
}
.blog-product-card:hover { transform: translateY(-3px); }
.blog-product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.blog-product-card__info {
  padding: 10px;
}
.blog-product-card__info h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-product-card__price {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}
.blog-product-card__price del {
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 400;
}

/* Related Posts */
.blog-related-posts {
  margin-top: 30px;
}

/* ── Blog Sidebar ─────────────────────────────────────────── */
.blog-sidebar {
  position: sticky;
  top: 80px;
}
.blog-sidebar__widget {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.blog-sidebar__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-sidebar__title i {
  color: var(--accent);
  font-size: 0.85rem;
}
.blog-sidebar__search {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(0,0,0,0.2);
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}
.blog-sidebar__search:focus {
  border-color: var(--accent);
}
.blog-sidebar__search-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}
.blog-sidebar__cats {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-sidebar__cats li {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.blog-sidebar__cats li:last-child { border-bottom: none; }
.blog-sidebar__cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition);
}
.blog-sidebar__cats a:hover {
  color: var(--accent);
  padding-right: 6px;
}
.blog-sidebar__count {
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
}
.blog-sidebar__recent {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.blog-sidebar__recent-item {
  display: flex;
  gap: 10px;
  text-decoration: none;
  transition: var(--transition);
}
.blog-sidebar__recent-item:hover {
  opacity: 0.8;
}
.blog-sidebar__recent-item img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.blog-sidebar__recent-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.4;
  flex-shrink: 0;
}
.blog-sidebar__recent-item h5 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-sidebar__recent-item span {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.blog-sidebar__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ==========================================================================
   STRICT ISOLATED ADDITIONS (SONIC UPDATES)
   ========================================================================== */

/* 1. BRANDS PAGE STYLES */
.swiper-slide-brands {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.brand-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 15px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    height: 100%;
    transition: border-color 0.3s ease;
}

.brand-card:hover {
    border-color: var(--accent);
}

.brand-card__img-wrap {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-card__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-card__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

/* 2. MOBILE MENU ACCORDION */
.mobile-nav-group__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
}

.mobile-nav-group__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-nav-group.active .mobile-nav-group__content {
    max-height: 1000px;
}

/* 3. HERO SLIDER MOBILE HEIGHT & ISOLATION */
.store-hero-slider .main-hero-swiper {
    border-radius: 0 !important;
}

@media (max-width: 768px) {
    .store-hero-slider .hero-slide-container {
        aspect-ratio: auto !important;
        height: auto !important;
        min-height: 80vh !important;
    }
    .store-hero-slider .hero-slide__img {
        object-fit: cover !important;
        object-position: top center !important;
        height: 100% !important;
    }
}

/* Disable Ken Burns zoom on all devices (Desktop & Mobile) to prevent image cropping */
.swiper-slide-active .hero-slide__img,
.hero-slide__img {
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

/* 4. SCROLL INDICATOR */
.scroll-indicator {
  position: fixed;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: #fff;
  opacity: 1;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  text-shadow: 0 2px 15px rgba(0,0,0,0.8);
}

.scroll-indicator::after {
  content: "SCROLL DOWN";
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-top: 5px;
}

.scroll-indicator.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -60%);
}

.scroll-indicator__mouse {
  width: 22px;
  height: 35px;
  border: 2px solid #fff;
  border-radius: 20px;
  position: relative;
}

.scroll-indicator__dot {
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollDot 2s infinite;
}

@keyframes scrollDot {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 15px); opacity: 0; }
}
