/* =====================================================================
   NEW CITY BEDDING — PREMIUM DESIGN SYSTEM
   Version: 2.0
   All class names backward-compatible with existing PHP templates.
   ===================================================================== */

/* ── Google Fonts (loaded in header.php) ── */

/* ── CSS Custom Properties ── */
:root {
  /* Palette - Kids Clothing Theme */
  --color-primary: #87cefa; /* Baby Blue */
  --color-primary-light: #b0e0e6;
  --color-primary-dark: #4682b4;
  --color-accent: #ffb6c1; /* Pastel Pink */
  --color-accent-dark: #ff69b4;
  --color-accent-light: #ffc0cb;
  --color-gold: #ffe066; /* Yellow */
  --color-text: #2d3748;
  --color-text-secondary: #718096;
  --color-muted: #a0aec0;
  --color-bg: #fffbf9; /* Soft White */
  --color-surface: #ffffff;
  --color-border: #edf2f7;
  --color-border-light: #f7fafc;
  --color-success: #9ae6b4; /* Mint */
  --color-warning: #faf089;
  --color-danger: #feb2b2;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(10,37,64,.04);
  --shadow-sm: 0 2px 8px rgba(10,37,64,.06);
  --shadow: 0 4px 16px rgba(10,37,64,.08);
  --shadow-md: 0 8px 24px rgba(10,37,64,.10);
  --shadow-lg: 0 12px 40px rgba(10,37,64,.12);
  --shadow-xl: 0 20px 60px rgba(10,37,64,.16);

  /* Layout */
  --max-width: 1280px;
  --header-height: 72px;

  /* Transitions */
  --transition-fast: 200ms ease-in-out;
  --transition: 280ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img { max-width: 100%; display: block; }
picture { display: block; }

/* ── Mobile-only elements: hidden on desktop ── */
.site-header__mobile-row,
.search-form--mobile,
.mobile-sticky-actions,
.drawer-backdrop,
.mobile-drawer {
  display: none;
}

/* =====================================================================
   ANNOUNCEMENT BAR
   ===================================================================== */
.announcement-bar {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  padding: 8px 16px;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.announcement-bar__scroll { flex: 1; overflow: hidden; min-width: 0; }
.announcement-bar__track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
  animation: announcement-scroll 22s linear infinite;
}
.announcement-bar__item { padding: 0 2.5rem; }
.announcement-bar__phone {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
  opacity: 0.95;
  transition: opacity var(--transition-fast);
}
.announcement-bar__phone:hover { opacity: 1; }
.announcement-bar a { color: #fff; text-decoration: none; }
.announcement-bar a:hover { text-decoration: underline; }

@keyframes announcement-scroll {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .announcement-bar__track { animation: none; }
}

/* =====================================================================
   SITE HEADER
   ===================================================================== */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 1.5rem;
  transition: box-shadow var(--transition), background var(--transition);
  position: relative;
  z-index: 80;
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: var(--header-height);
}
.site-header__row .logo { flex: 0 0 auto; }
.site-header__row .logo img {
  width: auto;
  height: 110px;
  max-width: 400px;
  object-fit: contain;
}

/* Search */
.search-form { flex: 1; display: flex; position: relative; }
.search-form--desktop { display: flex !important; flex: 1 1 auto; min-width: 0; }
.search-form--desktop input { min-width: 0; }

.search-form input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition-fast), background var(--transition-fast);
  outline: none;
}
.search-form input:focus {
  border-color: var(--color-primary);
  background: #fff;
}
.search-form button {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity var(--transition-fast);
}
.search-form button:hover { opacity: 0.9; }

/* Header icons */
.header-icons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  white-space: nowrap;
  flex: 0 0 auto;
}
.header-icons a,
.header-icons button {
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.header-icons a:hover,
.header-icons button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(10,37,64,0.03);
}

/* Category nav */
.category-nav {
  display: flex;
  gap: 0.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  font-size: 0.88rem;
  align-items: center;
  min-height: 40px;
  padding: 0 0 4px;
}
.category-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}
.category-nav a:hover {
  color: var(--color-primary);
  background: rgba(10,37,64,0.05);
}

/* =====================================================================
   MAIN CONTENT
   ===================================================================== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
}

/* =====================================================================
   HERO SLIDER
   ===================================================================== */
.hero { overflow: hidden; }
.hero img { border-radius: var(--radius-lg); width: 100%; }

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero-slider__track { position: relative; }
.hero-slider__slide {
  position: relative;
  animation: fadeIn 0.5s ease-in-out;
}
.hero-slider__slide img {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
}
.hero-slider__overlay {
  position: absolute;
  left: 5%;
  bottom: 8%;
  max-width: 480px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero-slider__overlay h2 {
  margin: 0 0 0.4rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-slider__overlay p {
  margin: 0 0 0.75rem;
  opacity: 0.9;
}
.hero-slider__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.hero-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}
.hero-slider__dot.is-active {
  background: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =====================================================================
   SECTION LAYOUT
   ===================================================================== */
.home-section { margin: 2.5rem 0; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.section-heading h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}
.section-heading a {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}
.section-heading a:hover {
  color: var(--color-accent-dark);
}

/* =====================================================================
   GRIDS
   ===================================================================== */
.category-grid, .product-grid { display: grid; gap: 1.25rem; margin-top: 1rem; }
.category-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* =====================================================================
   POPULAR CATEGORIES
   ===================================================================== */
.popular-categories { margin-top: 2rem; }
.popular-categories h2 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--color-text);
  transition: transform var(--transition-fast);
}
.category-tile:hover {
  color: var(--color-primary);
  transform: translateY(-3px);
}
.category-tile img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 3px solid var(--color-border-light);
  background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.category-tile:hover img {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(10,37,64,0.1);
}
.category-tile span {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
}

/* =====================================================================
   PRODUCT CARDS
   ===================================================================== */
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-card__image-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  aspect-ratio: 1/1;
}
.product-card__image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.product-card:hover .product-card__image-link img {
  transform: scale(1.06);
}

/* Badges */
.badge {
  position: absolute;
  top: 10px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: #fff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.badge--discount {
  left: 10px;
  background: linear-gradient(135deg, var(--color-danger), #dc2626);
}
.badge--featured {
  right: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
}

/* Card body */
.product-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0;
  padding: 0.75rem 0.85rem 0.25rem;
  line-height: 1.35;
}
.product-card h3 a {
  color: var(--color-text);
  transition: color var(--transition-fast);
}
.product-card h3 a:hover { color: var(--color-primary); }

.product-card__price {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0 0.85rem;
  flex-wrap: wrap;
}
.price-now {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.05rem;
}
.price-was {
  text-decoration: line-through;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.product-card__actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem 0.85rem;
  margin-top: auto;
  flex-wrap: wrap;
}

/* =====================================================================
   BUTTON SYSTEM
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: scale(0.98);
  box-shadow: none;
}

/* Ripple effect */
.btn .btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: btnRipple 0.5s ease-out;
  pointer-events: none;
}
@keyframes btnRipple {
  to { transform: scale(4); opacity: 0; }
}

/* Primary button */
.btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(10,37,64,0.2);
}
.btn--primary:hover {
  box-shadow: 0 4px 16px rgba(10,37,64,0.3);
  transform: translateY(-2px);
}
.btn--primary:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(10,37,64,0.2);
}

/* Secondary button */
.btn--secondary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(232,93,42,0.2);
}
.btn--secondary:hover {
  box-shadow: 0 4px 16px rgba(232,93,42,0.3);
  transform: translateY(-2px);
}
.btn--secondary:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(232,93,42,0.2);
}

/* Wishlist button */
.js-toggle-wishlist {
  font-size: 1.1rem;
  min-width: 40px;
  padding: 8px;
  color: var(--color-muted);
  transition: all var(--transition-fast);
}
.js-toggle-wishlist:hover {
  color: var(--color-danger);
  border-color: var(--color-danger);
  background: rgba(239,68,68,0.05);
}
.js-toggle-wishlist[data-in-wishlist="1"] {
  color: var(--color-danger);
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.3);
}

/* =====================================================================
   TRUST SECTION
   ===================================================================== */
.trust-section {
  margin: 2.5rem 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.trust-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.trust-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.trust-card__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}
.trust-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-primary);
}
.trust-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.4;
}

/* =====================================================================
   WHY CHOOSE US
   ===================================================================== */
.why-choose-section { margin: 2.5rem 0; }
.why-choose-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.why-choose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.why-choose-card {
  background: linear-gradient(145deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.why-choose-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.why-choose-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  border-radius: var(--radius);
}
.why-choose-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}
.why-choose-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* =====================================================================
   NEWSLETTER
   ===================================================================== */
.newsletter {
  text-align: center;
  padding: 2.5rem 2rem;
  background: linear-gradient(145deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  margin: 2.5rem 0;
}
.newsletter h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}
.newsletter form {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.newsletter input {
  padding: 10px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
  outline: none;
}
.newsletter input:focus { border-color: var(--color-primary); }
.newsletter button {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.newsletter button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10,37,64,0.2);
}

/* =====================================================================
   REVIEW SECTION (Homepage Slider & Product Page)
   ===================================================================== */
.reviews-section { margin: 2.5rem 0; }
.reviews-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 1rem;
}
.review-slider {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}
.review-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.review-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.review-card__stars {
  color: #f59e0b;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}
.review-card__body {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.review-card__author {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #c5d4e8;
  padding: 2rem 1.5rem 1rem;
  margin-top: 2rem;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-gold), var(--color-accent));
}

.footer-brand { min-width: 0; }
.footer-brand__link { display: inline-flex; align-items: center; max-width: 100%; }
.footer-brand__logo {
  display: block;
  width: auto;
  height: 50px;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.75rem;
}
.footer-brand p {
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.5;
  margin: 0 0 0.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-grid li { margin-bottom: 0.25rem; }
.footer-grid a {
  color: #c5d4e8;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}
.footer-grid a:hover { color: #fff; }

/* Social links */
.footer-social { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 0.82rem;
  color: #c5d4e8;
  transition: all var(--transition-fast);
}
.footer-social a:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

/* Payment methods */
.footer-payments {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.footer-payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: #e0e8f0;
}

.footer-bottom {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

/* =====================================================================
   CART DRAWER
   ===================================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100%;
  height: 100%;
  background: var(--color-surface);
  box-shadow: var(--shadow-xl);
  z-index: 100;
  overflow-y: auto;
  padding: 0;
  transform: translateX(0);
  transition: transform var(--transition);
}
.cart-drawer[hidden] { display: none; }

.cart-drawer__inner { padding: 1.5rem; }
.cart-drawer__inner h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}

.cart-drawer__item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  position: relative;
  padding: 0.75rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  transition: background var(--transition-fast);
}
.cart-drawer__item:hover { background: var(--color-border-light); }
.cart-drawer__item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.cart-drawer__item a {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
}
.cart-drawer__item a:hover { color: var(--color-primary); }
.cart-drawer__item div {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}
.cart-remove-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--color-muted);
  transition: color var(--transition-fast);
  padding: 2px 6px;
  border-radius: 4px;
}
.cart-remove-btn:hover {
  color: var(--color-danger);
  background: rgba(239,68,68,0.08);
}

.cart-drawer__subtotal {
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border-light);
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer #cart-close {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 10px;
  text-align: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.cart-drawer #cart-close:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* =====================================================================
   BREADCRUMB
   ===================================================================== */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}
.breadcrumb a:hover { color: var(--color-primary); }
.page-heading {
  margin-top: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

/* =====================================================================
   SHOP LAYOUT & FILTERS
   ===================================================================== */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
}
.shop-filters {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--header-height) + 16px);
  align-self: start;
}
.shop-filters label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
}
.shop-filters input,
.shop-filters select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--color-text);
  background: var(--color-bg);
  margin-top: 4px;
  transition: border-color var(--transition-fast);
  outline: none;
}
.shop-filters input:focus,
.shop-filters select:focus { border-color: var(--color-primary); }
.shop-filters button {
  width: 100%;
  margin-top: 0.5rem;
}

/* Sort bar for category pages */
.sort-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.sort-bar label {
  font-weight: 600;
  color: var(--color-text-secondary);
}
.sort-bar select {
  padding: 8px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.86rem;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.sort-bar select:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* Pagination */
.pagination { display: flex; gap: 0.4rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination a {
  padding: 8px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  transition: all var(--transition-fast);
}
.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.pagination a.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  border-color: transparent;
}

/* =====================================================================
   PRODUCT DETAIL PAGE
   ===================================================================== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.product-gallery {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.product-gallery img#main-image {
  border-radius: var(--radius-lg);
  aspect-ratio: 1/1;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform var(--transition);
  width: 100%;
}
.product-gallery:hover img#main-image {
  transform: scale(1.05);
}
.thumbnail-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.thumbnail-row .thumb {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid var(--color-border-light);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.thumbnail-row .thumb:hover {
  border-color: var(--color-primary);
  transform: scale(1.05);
}

/* Product info */
.product-info h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}
.product-price {
  font-size: 1.5rem;
  margin: 0.5rem 0 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.product-price .price-now {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
}
.product-price .price-was {
  font-size: 1rem;
  color: var(--color-muted);
  text-decoration: line-through;
}

/* Variant select */
.product-info > label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.product-info select,
#variant-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--color-surface);
  color: var(--color-text);
  margin-top: 6px;
  transition: border-color var(--transition-fast);
  outline: none;
}
#variant-select:focus { border-color: var(--color-primary); }

/* Quantity stepper */
.quantity-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 1rem 0;
}
.quantity-stepper button,
.qty-minus, .qty-plus {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  font-size: 1.1rem;
  font-family: inherit;
  color: var(--color-text);
  transition: all var(--transition-fast);
}
.qty-minus {
  border-radius: var(--radius) 0 0 var(--radius);
  border-right: none;
}
.qty-plus {
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left: none;
}
.qty-minus:hover, .qty-plus:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.quantity-stepper input {
  width: 60px;
  height: 42px;
  text-align: center;
  border: 1.5px solid var(--color-border);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  outline: none;
}

/* Product actions */
.product-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* Stock status */
.stock-status {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--color-success);
}

/* Delivery info */
.delivery-info {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.delivery-info p {
  margin: 0.35rem 0;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}
.delivery-info strong { color: var(--color-text); }

/* Trust badges on product page */
.product-trust-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.product-trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.product-trust-badge__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Product tabs / description */
.product-tabs {
  margin-top: 2.5rem;
}
.product-tabs h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border-light);
}
.product-tabs p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* Details table */
.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.88rem;
}
.details-table th,
.details-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-light);
}
.details-table th {
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  width: 35%;
}
.details-table td { color: var(--color-text-secondary); }

/* Reviews */
.reviews {
  margin-top: 2rem;
}
.reviews h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
}
.reviews h4 {
  font-size: 1rem;
  margin: 1.5rem 0 0.75rem;
}

/* FAQ Accordion */
.faq-section { margin: 2rem 0; }
.faq-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.75rem;
}
.faq-item {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.faq-item summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition-fast);
}
.faq-item summary:hover { background: var(--color-bg); }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--color-muted); }
.faq-item[open] summary::after { content: '−'; }
.faq-item__body {
  padding: 0 1rem 0.75rem;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* =====================================================================
   CART PAGE
   ===================================================================== */
.cart-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cart-table th,
.cart-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-light);
  text-align: left;
  vertical-align: middle;
  font-size: 0.88rem;
}
.cart-table th {
  background: var(--color-bg);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
}
.cart-table tr:last-child td { border-bottom: 0; }
.cart-table tr:hover td { background: rgba(10,37,64,0.01); }
.cart-table img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-right: 12px;
  vertical-align: middle;
}
.cart-qty-input {
  width: 60px;
  padding: 8px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  text-align: center;
  font-size: 0.88rem;
}
.cart-summary {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}
.cart-summary div {
  font-size: 1.05rem;
  color: var(--color-text);
}

/* =====================================================================
   CHECKOUT PAGE
   ===================================================================== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}
.checkout-layout form {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.checkout-layout form h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
}
.checkout-layout form h3:first-of-type { margin-top: 0; }
.checkout-layout form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
}
.checkout-layout input,
.checkout-layout select,
.checkout-layout textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--color-text);
  background: var(--color-bg);
  margin-top: 4px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  outline: none;
}
.checkout-layout input:focus,
.checkout-layout select:focus,
.checkout-layout textarea:focus {
  border-color: var(--color-primary);
  background: #fff;
}
.checkout-layout textarea { min-height: 80px; resize: vertical; }

/* Payment radio cards */
.checkout-layout form label:has(input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 0.5rem;
}
.checkout-layout form label:has(input[type="radio"]):hover {
  border-color: var(--color-primary);
  background: rgba(10,37,64,0.02);
}
.checkout-layout form label:has(input[type="radio"]:checked) {
  border-color: var(--color-primary);
  background: rgba(10,37,64,0.04);
}

/* Coupon */
.checkout-coupon {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.checkout-coupon input {
  flex: 1;
  min-width: 180px;
}
.checkout-coupon .btn { margin-top: 4px; }

#place-order-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  margin-top: 1rem;
}

/* Checkout summary */
.checkout-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}
.checkout-summary h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
}
.checkout-summary__item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}
.checkout-summary__item:last-of-type { border-bottom: none; }
.checkout-summary__item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.checkout-summary__item div {
  font-size: 0.88rem;
  font-weight: 500;
}
.checkout-summary__item small {
  color: var(--color-muted);
  font-size: 0.8rem;
}
.checkout-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}
.checkout-summary__row strong {
  color: var(--color-text);
}
.checkout-summary__total {
  font-size: 1.05rem !important;
  font-weight: 700;
  border-top: 2px solid var(--color-border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  color: var(--color-text) !important;
}
.checkout-summary__total strong {
  color: var(--color-primary);
  font-size: 1.15rem;
}

/* =====================================================================
   ORDER SUCCESS
   ===================================================================== */
.order-success {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.order-success h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-success);
  margin: 0 0 0.5rem;
}
.order-success .order-success__checkmark {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
  animation: successPop 0.5s ease-out;
}
@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.order-totals {
  text-align: left;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.order-totals div {
  margin: 0.35rem 0;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  display: flex;
  justify-content: space-between;
}

/* =====================================================================
   AUTH FORM
   ===================================================================== */
.auth-form {
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
}
.auth-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.92rem;
  margin-top: 4px;
  transition: border-color var(--transition-fast);
  outline: none;
}
.auth-form input:focus,
.auth-form textarea:focus {
  border-color: var(--color-primary);
}
.auth-form textarea { min-height: 100px; resize: vertical; }
.form-error { color: var(--color-danger); font-size: 0.88rem; font-weight: 500; }
.form-success { color: var(--color-success); font-size: 0.88rem; font-weight: 500; }

/* =====================================================================
   EMPTY STATE
   ===================================================================== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-muted);
  font-size: 1rem;
}
.empty-state a {
  color: var(--color-accent);
  font-weight: 600;
}
.empty-state a:hover { text-decoration: underline; }

/* =====================================================================
   CMS CONTENT
   ===================================================================== */
.cms-content img, .cms-content table, .cms-content iframe, .cms-content video { max-width: 100%; height: auto; }
.cms-content table { overflow-x: auto; display: block; }

/* =====================================================================
   TOAST NOTIFICATION
   ===================================================================== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  pointer-events: auto;
  animation: toastSlideIn 0.35s ease-out, toastFadeOut 0.3s ease-in 2.7s forwards;
  min-width: 240px;
}
.toast--success {
  border-left: 4px solid var(--color-success);
}
.toast--success .toast__icon {
  color: var(--color-success);
  font-size: 1.2rem;
}
@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastFadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* =====================================================================
   LIVE SEARCH DROPDOWN
   ===================================================================== */
.live-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}
.live-search-results.is-open { display: block; }
.live-search__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--transition-fast);
  text-decoration: none;
  color: var(--color-text);
}
.live-search__item:last-child { border-bottom: none; }
.live-search__item:hover { background: var(--color-bg); }
.live-search__item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.live-search__item-info { flex: 1; min-width: 0; }
.live-search__item-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-search__item-price {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 700;
}
.live-search__no-results {
  padding: 1.25rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.88rem;
}

/* =====================================================================
   SCROLL REVEAL ANIMATION
   ===================================================================== */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================================
   PRODUCT POLICY BADGES
   ===================================================================== */
.policy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0.35rem 0;
  width: 100%;
}
.policy-badge--free-cod {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.policy-badge--delivery-charge {
  background: #fefce8;
  border: 1px solid #fde68a;
  color: #92400e;
}
.policy-badge--advance-required {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}
.policy-badge--full-advance {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* =====================================================================
   FLOATING WHATSAPP
   ===================================================================== */
.floating-whatsapp {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.floating-whatsapp svg { width: 24px; height: 24px; fill: currentColor; flex: 0 0 auto; }
.floating-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.24);
  color: #fff;
}
.floating-whatsapp:focus-visible { outline: 3px solid rgba(37,211,102,.35); outline-offset: 3px; }

/* =====================================================================
   MOBILE DRAWER
   ===================================================================== */
.mobile-drawer__brand img {
  display: block;
  width: auto;
  height: 32px;
  max-width: 190px;
  object-fit: contain;
}
.mobile-drawer__section a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.mobile-drawer__section a > span:last-child {
  color: var(--color-muted);
  font-size: 1.2rem;
  line-height: 1;
}

/* =====================================================================
   TABLE HELPERS
   ===================================================================== */
.table-scroll,
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* =====================================================================
   RESPONSIVE: Desktop ≥ 861px
   ===================================================================== */
@media screen and (min-width: 861px) {
  .site-header__mobile-row,
  .search-form--mobile,
  .mobile-drawer,
  .drawer-backdrop,
  .mobile-sticky-actions { display: none !important; }

  .site-header__row,
  .search-form--desktop,
  .category-nav { display: flex !important; }
}

/* =====================================================================
   RESPONSIVE: Mobile ≤ 860px
   ===================================================================== */
@media screen and (max-width: 860px) {
  /* Hide desktop elements */
  .site-header__row,
  .search-form--desktop,
  .category-nav {
    display: none !important;
  }

  /* Show mobile elements */
  .site-header__mobile-row { display: grid !important; }
  .search-form--mobile { display: flex !important; }

  /* Layouts go single column */
  .shop-layout,
  .product-detail,
  .checkout-layout { grid-template-columns: 1fr; }

  /* Header */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    padding: 0 !important;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
  }

  .site-header__mobile-row {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 7px 12px;
    gap: 4px;
  }

  /* Hamburger */
  .mobile-menu-toggle {
    grid-column: 1;
    width: 44px;
    height: 44px;
    margin: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    display: block !important;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition-fast);
  }

  /* Logo center */
  .logo--mobile {
    grid-column: 2;
    justify-self: center;
    width: 100%;
    max-width: 280px;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .logo--mobile img {
    width: auto;
    height: 90px;
    max-width: 280px;
    object-fit: contain;
  }

  /* Cart icon */
  .mobile-cart-icon {
    grid-column: 3;
    justify-self: end;
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--color-text);
  }
  .mobile-cart-icon svg { width: 26px; height: 26px; }
  .cart-badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
  }

  /* Mobile search */
  .search-form--mobile {
    width: 100%;
    padding: 0 12px 10px;
    margin: 0;
  }
  .search-form--mobile input {
    height: 44px;
    min-width: 0;
    width: 100%;
    padding: 0 14px;
    font-size: 16px;
    border-radius: var(--radius) 0 0 var(--radius);
    border: 1.5px solid var(--color-border);
    background: var(--color-bg);
  }
  .search-form--mobile button {
    flex: 0 0 50px;
    width: 50px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 var(--radius) var(--radius) 0;
  }

  /* Main padding */
  main { padding: 12px; }

  /* Hero */
  .hero-slider,
  .hero-slider__slide,
  .hero-slider__slide img {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius);
  }
  .hero-slider__slide img { height: auto; object-fit: contain; }
  .hero-slider__overlay { display: none; }
  .hero-slider__overlay h2 { font-size: 1.2rem; }
  .hero-slider__overlay p { font-size: 0.85rem; }

  /* Categories — horizontal scroll */
  .popular-categories { margin-top: 16px; overflow: hidden; }
  .popular-categories h2 { font-size: 1.1rem; margin-bottom: 10px; }
  .category-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100%;
    gap: 14px;
    margin: 0;
    padding: 2px 2px 10px;
    overflow-x: auto !important;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .category-grid::-webkit-scrollbar { display: none; }
  .category-tile {
    flex: 0 0 82px !important;
    width: 82px !important;
    min-width: 82px;
  }
  .category-tile img {
    width: 68px !important;
    height: 68px !important;
    margin: 0 auto 6px;
  }
  .category-tile span {
    font-size: 0.72rem;
    white-space: normal;
    overflow: hidden;
  }

  /* Product grid — 2 columns */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .product-card { padding: 0; }
  .product-card h3 {
    font-size: 0.8rem;
    padding: 0.5rem 0.6rem 0.15rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2em;
  }
  .product-card__price {
    padding: 0 0.6rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    row-gap: 0.1rem;
  }
  .price-now { font-size: 0.92rem; }
  .price-was { font-size: 0.72rem; }
  .badge { font-size: 0.6rem; padding: 2px 6px; top: 6px; }
  .badge--discount { left: 6px; }
  .badge--featured { right: 6px; }
  .product-card__actions {
    padding: 0.4rem 0.6rem 0.6rem;
  }
  .product-card__actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    padding: 6px 4px;
    font-size: 0.7rem;
    text-align: center;
    white-space: nowrap;
  }
  .product-card__actions .js-toggle-wishlist {
    flex: 0 0 34px;
    padding: 6px 0;
    font-size: 0.9rem;
  }

  .section-heading h2 { font-size: 1.05rem; }

  /* Trust grid */
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .trust-card { padding: 1rem 0.75rem; }
  .trust-card__icon { font-size: 1.6rem; }
  .trust-card h4 { font-size: 0.82rem; }
  .trust-card p { font-size: 0.72rem; }

  /* Why choose */
  .why-choose-grid { grid-template-columns: 1fr; gap: 0.75rem; }

  /* Generic overflow safety */
  body { overflow-x: hidden; }
  table { max-width: 100%; }
  .cart-table, .details-table { min-width: 480px; }
  .newsletter form { flex-wrap: wrap; justify-content: center; }
  .newsletter input { width: 100%; }
  .footer-grid { text-align: left; }
  .cart-drawer { width: 100%; }

  /* Mobile drawer */
  .drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .drawer-backdrop.is-open { opacity: 1; }
  .drawer-backdrop[hidden] { display: none; }
  .drawer-backdrop:not([hidden]) { display: block !important; }

  .mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: min(84vw, 340px);
    max-height: 100dvh;
    background: var(--color-surface);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }
  .mobile-drawer[hidden] { display: none; }
  .mobile-drawer:not([hidden]) { display: flex !important; }
  .mobile-drawer.is-open { transform: translateX(0); }

  .mobile-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    flex: 0 0 auto;
    min-height: 60px;
  }
  .mobile-drawer__title { font-weight: 700; }
  .mobile-drawer__close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background var(--transition-fast);
  }
  .mobile-drawer__close:hover { background: rgba(255,255,255,0.15); }

  .mobile-drawer__body {
    overflow-y: auto;
    padding: 0.5rem 0 1.5rem;
    flex: 1;
  }
  .mobile-drawer__section {
    padding: 0.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
  }
  .mobile-drawer__section:last-child { border-bottom: none; }
  .mobile-drawer__section h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin: 0.5rem 0;
    font-weight: 700;
  }
  .mobile-drawer__section a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px;
    font-size: 0.92rem;
    font-weight: 500;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text);
    transition: color var(--transition-fast);
  }
  .mobile-drawer__section a:last-child { border-bottom: none; }
  .mobile-drawer__section a:hover { color: var(--color-primary); }

  body.drawer-open { overflow: hidden; }

  /* Product page: sticky mobile bar */
  .pagetype-product { padding-bottom: 76px; }
  .mobile-sticky-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex !important;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  }
  .mobile-sticky-actions .btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 0.92rem;
  }

  /* Product detail */
  .product-detail { gap: 1rem; }
  .product-actions { flex-wrap: wrap; }
  .product-actions .btn { flex: 1 1 auto; }
  .thumbnail-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .thumbnail-row::-webkit-scrollbar { display: none; }
  .thumbnail-row .thumb { flex: 0 0 auto; }
  .quantity-stepper input { width: 100%; }
  .product-trust-badges { grid-template-columns: 1fr; }

  /* Checkout */
  .checkout-layout form { padding: 1.25rem; }
  .checkout-coupon input { flex: 1 1 100%; }

  /* Forms: prevent iOS zoom */
  .checkout-layout input,
  .checkout-layout select,
  .checkout-layout textarea,
  .auth-form input,
  .auth-form textarea,
  .shop-filters input,
  .shop-filters select {
    font-size: 16px;
  }

  .pagination { flex-wrap: wrap; }

  /* Cart drawer */
  .cart-drawer { z-index: 1002; }

  /* Toast */
  #toast-container { top: auto; bottom: 80px; right: 12px; left: 12px; }
  .toast { min-width: auto; }

  /* Floating WhatsApp */
  .floating-whatsapp {
    right: 14px;
    bottom: 14px;
    min-height: 50px;
    padding: 0 15px;
  }
  .floating-whatsapp span { display: none; }
  .floating-whatsapp svg { width: 27px; height: 27px; }

  /* Move WhatsApp up when sticky bar is visible */
  .pagetype-product .floating-whatsapp { bottom: 82px; }

  /* Shop filters — collapsible on mobile */
  .shop-filters {
    position: static;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .product-grid { gap: 0.45rem; }
  .product-card__actions .btn { font-size: 0.65rem; padding: 5px 3px; }
  .hero-slider { border-radius: var(--radius-sm); }
}

/* Welcome Popup */
.welcome-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.welcome-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  animation: fadeInOverlay 0.6s ease-out forwards;
}
.welcome-popup__content {
  position: relative;
  z-index: 10000;
  background: transparent;
  max-width: 600px;
  width: 100%;
  animation: popInBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.welcome-popup__content img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
  display: block;
}
.welcome-popup__close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text);
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
  z-index: 10001;
}
.welcome-popup__close:hover {
  transform: scale(1.15) rotate(90deg);
  background-color: var(--color-surface-alt);
}
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popInBounce {
  0% { opacity: 0; transform: scale(0.85) translateY(30px); }
  60% { opacity: 1; transform: scale(1.02) translateY(-5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
