/* =============================================
   IndexStyle - Modern Thai E-Commerce
   Color: Red / Black / White - Bold & Editorial
   ============================================= */

:root {
  /* Primary brand red */
  --color-primary: #dc2626;
  --color-primary-dark: #b91c1c;
  --color-primary-light: #fef2f2;

  /* Neutrals - warmer, softer */
  --color-black: #1c1917;             /* warm near-black (stone-900) */
  --color-dark: #292524;              /* warm charcoal text */
  --color-gray-900: #44403c;
  --color-gray-700: #57534e;
  --color-gray-500: #78716c;
  --color-gray-400: #a8a29e;
  --color-gray-300: #d6d3d1;
  --color-gray-200: #e7e5e4;
  --color-gray-100: #f5f5f4;
  --color-gray-50: #fafaf9;
  --color-white: #fff;
  --color-cream: #fafaf9;

  /* Accent palette - replaces heavy red/black combo */
  --color-accent-50: #f8fafc;         /* very soft slate (section bg) */
  --color-accent-100: #f1f5f9;        /* soft slate (alt sections) */
  --color-accent-200: #e2e8f0;
  --color-accent-700: #334155;        /* slate-700 for headings on light bg */

  /* Sale & status */
  --color-gold: #c9a961;
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;

  /* Footer - white background per user request */
  --color-footer-bg: #ffffff;
  --color-footer-text: #44403c;
  --color-footer-muted: #78716c;
  --color-footer-border: #ebe8e3;

  --font-display: 'Playfair Display', 'Prompt', serif;
  --font-thai: 'Prompt', 'Sarabun', system-ui, sans-serif;
  --font-body: 'Prompt', 'Sarabun', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.12);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --container: 1280px;
  --header-h: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-black);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== TOP BAR ===== */
.topbar {
  background: var(--color-black);
  color: var(--color-white);
  font-size: 12.5px;
  padding: 8px 0;
  letter-spacing: 0.3px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.topbar a { opacity: 0.85; transition: opacity .2s; }
.topbar a:hover { opacity: 1; color: var(--color-primary); }
.topbar-left, .topbar-right { display: flex; gap: 20px; align-items: center; }

/* ===== HEADER ===== */
.header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.25s ease, background 0.25s ease;
}
.header.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255,255,255,0.96);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}

.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--color-black);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.logo img {
  max-height: 40px;
  width: auto;
  display: block;
}
/* When logo has img child (real logo loaded), hide the text fallback */
.logo:has(img) .logo-text { display: none; }
.logo .accent { color: var(--color-primary); font-style: italic; }
.logo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); display: inline-block; margin-left: 4px; }

.search-box {
  position: relative;
  max-width: 540px;
  width: 100%;
  justify-self: center;
}
.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 50px 0 20px;
  border: 2px solid var(--color-gray-200);
  border-radius: 30px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  background: var(--color-gray-100);
}
.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-white);
  box-shadow: 0 0 0 4px rgba(212,0,0,0.1);
}
.search-box button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.search-box button:hover { background: var(--color-primary-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  position: relative;
  transition: background .15s;
  font-size: 11px;
  color: var(--color-gray-700);
}
.header-action:hover { background: var(--color-gray-100); color: var(--color-primary); }
.header-action i { font-size: 19px; color: var(--color-black); }
.header-action:hover i { color: var(--color-primary); }
.header-action .badge {
  position: absolute;
  top: 2px;
  right: 4px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 14px;
}

/* ===== NAV ===== */
.nav {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
}
.nav-inner {
  display: flex;
  justify-content: center;
  gap: 4px;
  height: 50px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-link {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-dark);
  position: relative;
  transition: color .2s;
  letter-spacing: 0.2px;
}
.nav-link:hover { color: var(--color-primary); }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width .25s, left .25s;
}
.nav-link:hover::after { width: 80%; left: 10%; }

.mobile-toggle, .mobile-search-btn { display: none; }

/* ===== HERO SLIDER ===== */
.hero {
  position: relative;
  width: 100%;
  /* Desktop: 1920x775 -> aspect ratio 1920/775 = 2.477 */
  aspect-ratio: 1920 / 775;
  max-height: 775px;
  overflow: hidden;
  background: var(--color-gray-100);
}
@media (max-width: 768px) {
  .hero {
    /* Mobile: 768x1024 aspect ratio = 0.75 (portrait).
       Use both aspect-ratio AND explicit height calc for maximum browser support.
       100vw * (1024/768) = 100vw * 1.3333 */
    aspect-ratio: 768 / 1024;
    height: calc(100vw * (1024 / 768));
    max-height: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);   /* Full-bleed edge-to-edge */
    margin-right: calc(50% - 50vw);
  }
}
.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide img, .hero-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
/* On mobile, prefer the mobile image variant (img.mobile shown only under 768px) */
.hero-slide img.desktop-only, .hero-slide video.desktop-only { display: block; }
.hero-slide img.mobile-only, .hero-slide video.mobile-only { display: none; }
@media (max-width: 768px) {
  .hero-slide img.desktop-only, .hero-slide video.desktop-only { display: none; }
  .hero-slide img.mobile-only, .hero-slide video.mobile-only { display: block; }
}
/* Subtle bottom-only dim ONLY when there is text overlay - applied to slides with .has-overlay */
.hero-slide.has-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}
.hero-content {
  position: absolute;
  z-index: 2;
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  max-width: 540px;
  color: var(--color-white);
}
.hero-eyebrow {
  display: inline-block;
  background: var(--color-primary);
  padding: 6px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  border-radius: 2px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-subtitle {
  font-size: clamp(16px, 1.4vw, 19px);
  margin-bottom: 28px;
  opacity: 0.95;
  font-weight: 300;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--color-white);
  color: var(--color-black);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .25s;
  border: 2px solid var(--color-white);
}
.hero-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  transform: translateX(4px);
}
.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 30px;
  height: 3px;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all .3s;
}
.hero-dot.active { background: var(--color-primary); width: 50px; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background .2s;
}
.hero-arrow:hover { background: var(--color-primary); }
.hero-arrow.prev { left: 24px; }
.hero-arrow.next { right: 24px; }

/* ===== PROMOTION SLIDER (under hero) ===== */
.promo-strip {
  background: var(--color-cream);
  padding: 24px 0;
  border-bottom: 1px solid var(--color-gray-200);
}
.promo-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.promo-track::-webkit-scrollbar { display: none; }
.promo-card {
  flex: 0 0 calc(33.333% - 12px);
  min-width: 280px;
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
}
.promo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.promo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.promo-card-overlay {
  position: absolute;
  inset: 0;
  padding: 20px;
  background: linear-gradient(135deg, rgba(0,0,0,0.4), transparent 60%);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.promo-card-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 4px;
}
.promo-card-sub { font-size: 13px; opacity: 0.9; }

/* ===== SECTION HEADER (modern "Special Items" style) ===== */
.section {
  padding: 70px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}
/* Row variant: title on left, view-all on right (no center alignment) */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  text-align: left;
  gap: 16px;
  flex-wrap: wrap;
}
.section-header-row .section-eyebrow { padding: 0; }
.section-header-row .section-eyebrow::before,
.section-header-row .section-eyebrow::after { display: none; }
.section-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-dark);
  text-decoration: none;
  padding: 8px 16px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: 999px;
  transition: all 0.15s;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.section-view-all:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.section-view-all i {
  font-size: 10px;
  transition: transform 0.15s;
}
.section-view-all:hover i { transform: translateX(3px); }
.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--color-accent-700);
  text-transform: uppercase;
  margin-bottom: 14px;
  position: relative;
  padding: 0 26px;
}
.section-eyebrow::before, .section-eyebrow::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--color-gray-300);
}
.section-eyebrow::before { left: 0; }
.section-eyebrow::after { right: 0; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
  color: var(--color-dark);
}
.section-title em {
  font-style: italic;
  color: var(--color-primary);
  font-weight: 400;
}
.section-title-alt {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--color-dark);
  position: relative;
}
.section-title-alt em {
  color: var(--color-primary);
  font-style: italic;
  font-weight: 700;
}
.section-sub {
  margin-top: 12px;
  color: var(--color-gray-500);
  font-size: 15px;
}

/* ===== PRODUCT SLIDER ===== */
.product-slider-wrap {
  position: relative;
}
.product-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 0;
}
.product-slider::-webkit-scrollbar { display: none; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex: 0 0 calc(25% - 15px);
  min-width: 200px;
  scroll-snap-align: start;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}
.product-image {
  position: relative;
  aspect-ratio: 1 / 1;          /* square - works for any product type */
  overflow: hidden;
  background: var(--color-white);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--color-gray-100);
}
.product-image a {
  width: 100%;
  height: 100%;
  display: block;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;          /* no cropping, no stretching */
  transition: transform .5s;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.badge-tag {
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.badge-tag.new { background: var(--color-black); }
.badge-tag.sale { background: var(--color-primary); }
.badge-tag.hot { background: var(--color-warning); color: var(--color-black); }
.product-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity .25s, transform .25s;
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }
.product-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  transition: background .2s, color .2s;
}
.product-action-btn:hover { background: var(--color-primary); color: var(--color-white); }
.product-action-btn.active { background: var(--color-primary); color: var(--color-white); }

.product-info {
  padding: 14px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-category {
  font-size: 11px;
  color: var(--color-gray-500);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-black);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
  line-height: 1.35;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-gold);
  margin-bottom: 8px;
}
.product-rating .count { color: var(--color-gray-500); }
.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}
.price-current {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.3px;
}
.price-old {
  font-size: 13px;
  color: var(--color-gray-500);
  text-decoration: line-through;
}
.price-discount {
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: auto;
}

.add-to-cart {
  margin-top: 12px;
  width: 100%;
  padding: 11px;
  background: var(--color-black);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.add-to-cart:hover { background: var(--color-primary); }

.slider-nav {
  position: absolute;
  top: 40%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background .2s, color .2s;
}
.slider-nav:hover { background: var(--color-primary); color: var(--color-white); }
.slider-nav.prev { left: -22px; }
.slider-nav.next { right: -22px; }

/* ===== MIDDLE PROMO BANNER ===== */
.promo-banner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 40px 0;
}
.promo-banner-grid.three { grid-template-columns: repeat(3, 1fr); }
.promo-banner {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}
.promo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}
.promo-banner:hover img { transform: scale(1.05); }
.promo-banner-content {
  position: absolute;
  inset: 0;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(90deg, rgba(0,0,0,0.55), rgba(0,0,0,0.1) 70%);
  color: var(--color-white);
}
.promo-banner-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--color-primary);
}
.promo-banner-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 10px;
  line-height: 1.1;
}
.promo-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
  width: fit-content;
}
.promo-banner-link::after {
  content: '→';
  transition: transform .25s;
}
.promo-banner:hover .promo-banner-link::after { transform: translateX(6px); }

/* ===== CATEGORY GRID ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
}
.category-tile {
  text-align: center;
  padding: 24px 12px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  transition: all .25s;
  background: var(--color-white);
}
.category-tile:hover {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.category-tile i {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 12px;
  transition: color .25s;
}
.category-tile:hover i { color: var(--color-white); }
.category-tile-name {
  font-size: 13px;
  font-weight: 600;
}

/* ===== BRAND SLIDER ===== */
.brand-section {
  background: var(--color-gray-100);
  padding: 60px 0;
  border-top: 1px solid var(--color-gray-200);
}
.brand-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0;
}
.brand-track::-webkit-scrollbar { display: none; }
.brand-card {
  flex: 0 0 180px;
  height: 90px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--color-gray-200);
  transition: all .25s;
  cursor: pointer;
}
.brand-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.brand-card img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(1); transition: filter .25s; }
.brand-card:hover img { filter: grayscale(0); }
.brand-card-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--color-gray-700);
  transition: color .25s;
}
.brand-card:hover .brand-card-text { color: var(--color-primary); }

/* ===== FOOTER ===== */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding-top: 60px;
  border-top: 1px solid var(--color-footer-border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--color-dark);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.footer-logo .accent { color: var(--color-primary); font-style: italic; }
.footer-logo img { max-height: 44px; width: auto; }
.footer-about {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-footer-muted);
  margin-bottom: 20px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-footer-border);
  background: var(--color-white);
  color: var(--color-footer-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.footer-social a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: var(--color-dark);
  position: relative;
  padding-bottom: 10px;
}
.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: var(--color-footer-muted);
  font-size: 14px;
  transition: color .15s, padding .15s;
  text-decoration: none;
}
.footer-links a:hover { color: var(--color-primary); padding-left: 4px; }

.footer-contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: var(--color-footer-muted);
  align-items: flex-start;
}
.footer-contact-item i {
  color: var(--color-primary);
  margin-top: 3px;
  width: 14px;
  text-align: center;
  font-size: 13px;
}

.newsletter {
  display: flex;
  gap: 0;
  margin-top: 14px;
  background: var(--color-gray-50);
  border: 1px solid var(--color-footer-border);
  border-radius: 999px;
  padding: 4px;
  overflow: hidden;
}
.newsletter input {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--color-dark);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.newsletter input::placeholder { color: var(--color-gray-400); }
.newsletter button {
  padding: 0 20px;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background .2s;
  border: none;
  cursor: pointer;
}
.newsletter button:hover { background: var(--color-primary-dark); }

.footer-bottom {
  border-top: 1px solid var(--color-footer-border);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--color-footer-muted);
  flex-wrap: wrap;
  gap: 14px;
}
.payment-icons { display: flex; gap: 8px; align-items: center; }
.payment-icons span {
  background: var(--color-white);
  border: 1px solid var(--color-footer-border);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-footer-muted);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all .2s;
  border: 2px solid transparent;
  text-align: center;
}
.btn-primary { background: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-dark { background: var(--color-black); color: var(--color-white); }
.btn-dark:hover { background: var(--color-primary); }
.btn-outline { border-color: var(--color-black); color: var(--color-black); }
.btn-outline:hover { background: var(--color-black); color: var(--color-white); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 36px; font-size: 15px; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 100px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--color-black);
  color: var(--color-white);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  border-left: 4px solid var(--color-primary);
  animation: slideInRight .3s;
}
.toast.success { border-left-color: var(--color-success); }
.toast.error { border-left-color: var(--color-danger); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== LANGUAGE SELECTOR ===== */
.lang-selector {
  position: relative;
}
#google_translate_element {
  display: inline-block;
}
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: var(--color-gray-500);
  background: var(--color-gray-100);
}
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-gray-500);
}
.empty-state i {
  font-size: 64px;
  color: var(--color-gray-300);
  margin-bottom: 20px;
}
.empty-state h3 {
  font-size: 22px;
  color: var(--color-dark);
  margin-bottom: 10px;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-gray-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Mobile rules consolidated at end of file (look for "MOBILE — APP STYLE") */

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */
.lang-switch {
  position: relative;
  display: inline-block;
  z-index: 9999;
}

.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  color: inherit;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-current:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.35);
}

.lang-current .lang-flag {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.lang-current .lang-code {
  letter-spacing: 0.5px;
}

.lang-current i {
  font-size: 9px;
  opacity: 0.7;
  transition: transform 0.2s;
}

.lang-switch.open .lang-current i {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 99999;
}

.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* When dropdown is open, lift the parent topbar above the sticky header */
.topbar:has(.lang-switch.open) {
  position: relative;
  z-index: 9999;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  color: var(--color-black);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.lang-option:hover {
  background: var(--color-cream);
}

.lang-option.active {
  background: var(--color-cream);
  color: var(--color-primary);
  font-weight: 600;
}

.lang-option .lang-flag {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/* Hide Google Translate artifacts if any code accidentally loads it */
.skiptranslate,
iframe.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
#goog-gt-tt {
  display: none !important;
}
body { top: 0 !important; }
font[style*="background-color"], font[style*="vertical-align"] { background: none !important; }

/* ==========================================================================
   MEGA BANNER
   ========================================================================== */
.mega-banner-section {
  padding: 60px 0;
}

.mega-banner {
  position: relative;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a, #d40000);
}

.mega-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Overlay only when there is text content to make readable */
.mega-banner.has-content .mega-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
}

.mega-banner-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 60px;
  max-width: 600px;
  color: white;
}

.mega-banner-eyebrow {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 12px;
}

.mega-banner-title {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 14px;
}

.mega-banner-content p {
  font-size: 16px;
  margin-bottom: 24px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .mega-banner { height: 280px; }
  .mega-banner-content { padding: 0 24px; }
  .mega-banner-title { font-size: 32px; }
}

/* ==========================================================================
   MIDDLE BANNERS GRID
   ========================================================================== */
.middle-banners-section {
  padding: 0 0 60px;
}

.middle-banners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.middle-banner-card {
  position: relative;
  display: block;
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-cream);
}

.middle-banner-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.middle-banner-card:hover img {
  transform: scale(1.05);
}

.middle-banner-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%);
}

.middle-banner-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px;
  z-index: 1;
  color: white;
}

.middle-banner-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.85;
  text-transform: uppercase;
}

.middle-banner-content h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin: 6px 0 4px;
}

.middle-banner-content p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .middle-banners { grid-template-columns: 1fr; }
}



/* ==========================================================================
   MOBILE — APP STYLE LAYOUT (≤ 768px)
   Designed like Lazada/Shopee/IKEA mobile app:
   - Top app bar: logo (left) → search → hamburger + cart (right)
   - Slide drawer with login form, categories, account, language
   - Bottom navigation
   - White-first palette, red accents
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-bottom: 0;
    background: var(--color-white);
  }

  /* ===== Hide topbar (gold strip) on mobile ===== */
  .topbar {
    display: none !important;
  }

  /* ===== HEADER (compact app-bar) =====
     Layout: [logo]    [menu] [cart] [search]
     Single row, icons only.
  */
  .header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
    padding: 0;
    transition: box-shadow 0.25s ease, background 0.25s ease, backdrop-filter 0.25s ease;
  }
  /* Push body content down so it isn't hidden behind the fixed header */
  body { padding-top: 56px; }
  /* When scrolled past threshold, show shadow + blurred translucent bg */
  .header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    background: rgba(255,255,255,0.92);
  }
  .header-inner {
    display: flex !important;
    flex-direction: row !important;
    grid-template-columns: none !important;
    grid-template-rows: 1fr !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0 !important;
    height: 56px;
    padding: 0 12px !important;
  }
  .logo {
    flex: 0 0 auto;
    font-size: 20px !important;
    line-height: 1;
    white-space: nowrap;
    overflow: visible;
  }
  .logo img {
    max-height: 30px !important;
    width: auto !important;
  }
  /* Hide search BAR on mobile (replaced by search icon) */
  .search-box {
    display: none !important;
  }
  /* Header actions: menu / cart / search icons - aligned to right */
  .header-actions {
    flex: 0 0 auto;
    display: flex !important;
    flex-direction: row !important;
    gap: 2px !important;
    align-items: center;
    margin-left: auto;
  }
  .header-action {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 999px;
    position: relative;
  }
  .header-action span:not(.badge) {
    display: none !important;
  }
  .header-action i {
    font-size: 18px !important;
    color: var(--color-dark) !important;
  }
  /* Hide account & wishlist (in bottom nav + drawer) */
  .header-action[href="/account"],
  .header-action[href="/wishlist"] {
    display: none !important;
  }
  /* Cart icon with badge */
  .header-action[href="/cart"] .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    background: var(--color-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  /* Cart icon - first in mobile DOM order (before menu) */
  .header-action[href="/cart"] {
    background: var(--color-gray-100);
  }
  .header-action[href="/cart"]:active { background: var(--color-gray-200); }
  /* Hamburger button - between cart and search */
  .mobile-toggle {
    width: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-100);
    border: none;
    color: var(--color-dark);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    border-radius: 999px;
    margin-left: 4px;
    transition: background 0.15s;
  }
  .mobile-toggle:active { background: var(--color-gray-200); }
  /* Search icon (mobile only) - last */
  .mobile-search-btn {
    width: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-100);
    border: none;
    color: var(--color-dark);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    border-radius: 999px;
    margin-left: 4px;
    text-decoration: none;
  }
  .mobile-search-btn:active { background: var(--color-gray-200); }

  /* ===== TOP NAV (categories chips) =====
     Hidden on mobile — categories live in drawer + grid below hero.
  */
  .nav {
    display: none;
  }

  /* ===== DRAWER (right-side slide-in menu) ===== */
  .drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
    z-index: 200;
  }
  .drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
  }
  .drawer {
    position: fixed;
    top: 0;
    right: 0;            /* slide from RIGHT */
    bottom: 0;
    width: 86%;
    max-width: 340px;
    background: var(--color-white);
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    transform: translateX(100%);   /* off-screen right */
    transition: transform .25s ease-out;
    z-index: 210;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .drawer.open {
    transform: translateX(0);
  }
  /* Drawer tabs (Main Menu / Categories) - sits at the very top now */
  .drawer-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 48px;
    border-bottom: 1px solid var(--color-gray-200);
    background: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .drawer-tab {
    padding: 18px 14px;
    text-align: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
  }
  .drawer-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
  }
  .drawer-close {
    background: transparent;
    border: none;
    color: var(--color-gray-500);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .drawer-close:hover { color: var(--color-dark); }
  .drawer-panel {
    display: none;
  }
  .drawer-panel.active {
    display: block;
  }
  .drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    font-size: 15px;
    color: var(--color-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--color-gray-100);
    background: var(--color-white);
  }
  .drawer-link:active, .drawer-link:hover {
    background: var(--color-gray-100);
  }
  .drawer-link.active {
    color: var(--color-primary);
    background: var(--color-primary-light);
  }
  .drawer-link i {
    width: 20px;
    text-align: center;
    color: var(--color-gray-500);
    font-size: 16px;
  }
  .drawer-link.active i {
    color: var(--color-primary);
  }
  .drawer-link .chevron {
    margin-left: auto;
    color: var(--color-gray-400);
    font-size: 12px;
    width: auto;
  }
  /* Language strip in drawer */
  .drawer-langs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-gray-100);
  }
  .drawer-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--color-gray-100);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: all .15s;
  }
  .drawer-lang.active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
  }
  .drawer-section-title {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-gray-500);
    padding: 16px 18px 8px;
    background: var(--color-gray-50);
  }
  .drawer-foot {
    margin-top: auto;
    padding: 14px 18px;
    background: var(--color-gray-50);
    font-size: 11px;
    color: var(--color-gray-500);
  }
  .drawer-foot div { margin-bottom: 4px; }

  /* ===== HERO (mobile) =====
     Vertical 3:4 image fills the screen.
  */
  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 14%;
    top: auto;
    transform: none;
    max-width: none;
    text-align: center;
    z-index: 2;
  }
  .hero-arrow { display: none !important; }
  .hero-dots { bottom: 14px; }
  .hero-title { font-size: clamp(24px, 6vw, 36px) !important; }
  .hero-subtitle { font-size: 13px !important; }
  .hero-btn { padding: 10px 22px !important; font-size: 13px !important; }

  /* ===== SECTIONS ===== */
  .section { padding: 28px 0; }
  .section-header {
    margin-bottom: 16px;
    padding: 0 12px;
    text-align: left;
  }
  .section-header::before, .section-header::after { display: none !important; }
  .section-eyebrow {
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    display: block;
    color: var(--color-primary);
    font-weight: 600;
  }
  .section-title {
    font-size: 22px !important;
    text-align: left;
    line-height: 1.2;
    letter-spacing: -0.3px !important;
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    color: var(--color-dark);
  }
  .section-title-alt {
    font-size: 22px !important;
    text-align: left;
    line-height: 1.2;
    letter-spacing: -0.3px !important;
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    background: none !important;
    -webkit-text-fill-color: var(--color-dark) !important;
    color: var(--color-dark) !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    text-transform: none !important;
    -webkit-text-stroke: 0 !important;
  }
  .section-title em, .section-title span { display: inline; }
  .section-sub { font-size: 13px; margin-top: 8px; }

  /* ===== PRODUCT GRID — clean, white, 2-up ===== */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 12px;
  }
  .product-card {
    border-radius: 12px;
    border: 1px solid var(--color-gray-200);
    background: var(--color-white);
    box-shadow: none;
    transition: transform .2s;
  }
  .product-card:hover, .product-card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-gray-300);
  }
  .product-image {
    padding: 12px;
    background: var(--color-white) !important;
    border-bottom: none;
    aspect-ratio: 1;
  }
  .product-info {
    padding: 0 10px 12px;
  }
  .product-name {
    font-size: 12.5px !important;
    font-weight: 500;
    min-height: 32px !important;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--color-dark);
  }
  .price-current {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
  }
  .price-old {
    font-size: 11px;
    color: var(--color-gray-400);
  }
  .product-actions { display: none !important; }
  .product-badges {
    top: 8px;
    left: 8px;
    gap: 4px;
  }
  .badge-tag {
    font-size: 9px;
    padding: 3px 7px;
    letter-spacing: 0.5px;
    border-radius: 4px;
    font-weight: 700;
  }

  /* ===== CATEGORIES ===== */
  .category-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    padding: 0 12px;
  }
  .category-tile {
    padding: 14px 6px;
    border-radius: 12px;
    background: var(--color-gray-50);
    border: none;
    box-shadow: none;
    transition: background .15s;
  }
  .category-tile:hover, .category-tile:active {
    background: var(--color-primary-light);
  }
  .category-tile i {
    font-size: 22px;
    color: var(--color-primary);
  }
  .category-tile-name {
    font-size: 11px;
    margin-top: 6px;
    line-height: 1.2;
    color: var(--color-dark);
    font-weight: 500;
  }

  /* ===== PROMO STRIP ===== */
  .promo-strip { padding: 12px 0; background: transparent; }
  .promo-track {
    grid-template-columns: none !important;
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding: 0 12px;
    scrollbar-width: none;
  }
  .promo-track::-webkit-scrollbar { display: none; }
  .promo-card {
    flex: 0 0 80%;
    scroll-snap-align: start;
    border-radius: 12px;
    aspect-ratio: 16/9;
    overflow: hidden;
  }

  /* ===== HORIZONTAL PRODUCT SLIDERS ===== */
  .product-slider-wrap { padding: 0; }
  .product-slider {
    gap: 10px !important;
    padding: 4px 12px !important;
  }
  .product-slider .product-card {
    flex: 0 0 calc(50% - 6px);
    min-width: 160px;
  }
  .slider-arrow { display: none !important; }

  /* ===== BRANDS ===== */
  .brand-section { padding: 28px 0; }
  .brand-track {
    gap: 8px !important;
    padding: 0 12px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
  }
  .brand-track::-webkit-scrollbar { display: none; }
  .brand-card {
    flex: 0 0 30% !important;
    height: 64px !important;
    padding: 10px;
    border: 1px solid var(--color-gray-200);
    border-radius: 8px;
    background: var(--color-white);
    overflow: hidden;
  }
  .brand-card-text {
    font-size: 11px !important;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  /* ===== MEGA BANNER ===== */
  .mega-banner-section { padding: 28px 0; }
  .mega-banner {
    height: 200px !important;
    border-radius: 12px;
    margin: 0 12px;
    width: calc(100% - 24px);
  }
  .mega-banner-content { padding: 0 18px !important; max-width: none; }
  .mega-banner-title { font-size: 24px !important; }
  .mega-banner-content p { font-size: 13px; }

  /* ===== MIDDLE BANNERS ===== */
  .middle-banners {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 0 12px;
  }
  .middle-banner-card {
    height: 200px !important;
    border-radius: 12px;
  }

  /* ===== FOOTER ===== */
  .footer {
    padding: 28px 0 18px;
    background: var(--color-footer-bg);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    padding: 0 16px;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
  .footer-grid > div:last-child {
    grid-column: 1 / -1;
  }
  .footer-title { font-size: 13px; margin-bottom: 8px; }
  .footer-links a, .footer-contact-item { font-size: 12px; }
  .newsletter input {
    font-size: 13px;
    padding: 10px 14px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    font-size: 11px;
    padding: 0 16px;
  }

  /* Hide desktop-only language switcher (drawer has its own) */
  .lang-switch { display: none !important; }
  .topbar #languageSwitcher { display: none !important; }

  /* Bottom navigation removed - kept hidden for any stale DOM */
  .mobile-bottom-nav { display: none !important; }
  .mbn-item { display: none !important; }

  /* Buttons larger tap target */
  .btn { min-height: 42px; padding: 10px 18px; }

  /* Container padding on mobile */
  .container { padding: 0 14px !important; }

  /* Product detail page */
  .product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .product-gallery {
    position: static !important;
    max-width: none !important;
  }
  .gallery-main {
    aspect-ratio: 1;
    padding: 14px !important;
    border-radius: 12px;
  }
  .product-detail-info h1 {
    font-size: 22px !important;
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    word-break: break-word;
    margin-bottom: 8px !important;
  }
  .detail-price {
    padding: 14px !important;
  }
  .detail-price .current { font-size: 28px !important; }
  .detail-price .old { font-size: 16px !important; }
  .detail-actions {
    grid-template-columns: 1fr auto !important;
  }
  .feature-list {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
  }
  .tab-btn {
    padding: 12px 16px !important;
    font-size: 12px !important;
  }
}

/* ===== TINY PHONES ===== */
@media (max-width: 360px) {
  .product-grid { gap: 8px !important; }
  .category-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .header-inner { gap: 6px !important; padding: 0 8px !important; }
  .search-box input { font-size: 12px !important; }
  .logo { font-size: 18px !important; }
}

/* Hide drawer + bottom nav on desktop */
@media (min-width: 769px) {
  .mobile-bottom-nav { display: none !important; }
  .drawer, .drawer-backdrop { display: none !important; }
}

/* Always white card background */
.product-image {
  background: var(--color-white) !important;
}
.product-card {
  background: var(--color-white);
}

/* Mobile: tame all big page titles regardless of inline styles */
@media (max-width: 768px) {
  .container > h1,
  .container > div > h1,
  main h1,
  main > h1 {
    font-size: 22px !important;
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 14px !important;
    letter-spacing: 0 !important;
  }
  /* Cart breadcrumb area */
  .breadcrumb {
    font-size: 12px;
    padding: 10px 0;
  }
  /* Empty state inside cart/wishlist */
  .empty-state, .empty-cart {
    padding: 40px 16px !important;
  }
  .empty-state h2, .empty-cart h2 { font-size: 18px !important; }
  .empty-state p, .empty-cart p { font-size: 13px !important; }
}

/* ==========================================================================
   MOBILE INLINE SEARCH BAR (overlays the header in place)
   ========================================================================== */
.search-inline {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--color-white);
  z-index: 5;
}
.search-inline.open {
  display: flex;
}
.search-inline-back {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--color-dark);
  cursor: pointer;
  border-radius: 999px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-inline-form {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--color-gray-100);
  border-radius: 999px;
  padding: 0 14px;
  position: relative;
  height: 38px;
}
.search-inline-form > i {
  color: var(--color-gray-500);
  font-size: 13px;
  margin-right: 10px;
}
.search-inline-form input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-dark);
  outline: none;
  min-width: 0;
}
.search-inline-clear {
  background: transparent;
  border: none;
  color: var(--color-gray-500);
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
@media (min-width: 769px) {
  .search-inline { display: none !important; }
}

/* ==========================================================================
   GLOBAL: prevent horizontal scroll/swipe + smoother mobile scroll
   NOTE: Header uses position:fixed on mobile, so overflow on html is safe.
   ========================================================================== */
html, body {
  overflow-x: hidden;
  max-width: 100%;
  scroll-behavior: smooth;
}
body {
  position: relative;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;       /* No horizontal swipe-back */
  overscroll-behavior-y: auto;
  touch-action: pan-y;               /* Only vertical scroll, no pinch swipe */
}
/* Block any element from causing horizontal overflow */
img, video, iframe { max-width: 100%; }
* { -webkit-tap-highlight-color: transparent; }   /* Remove tap blue flash */


/* ==========================================================================
   MOBILE FOOTER (cream, logo-friendly)
   ========================================================================== */
@media (max-width: 768px) {
  .footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 28px 0 0 !important;
    margin-bottom: 0;
  }
  .footer .container { padding: 0 16px !important; }
  .footer-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 22px 16px !important;
    margin-bottom: 22px;
    padding-bottom: 0;
  }
  /* About block - full width at top, centered */
  .footer-grid > div:first-child {
    grid-column: 1 / -1 !important;
    text-align: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-footer-border);
  }
  .footer-logo {
    font-size: 22px !important;
    margin-bottom: 8px;
    justify-content: center;
    display: flex !important;
  }
  .footer-grid > div:first-child p,
  .footer-about {
    font-size: 12px !important;
    color: var(--color-footer-muted) !important;
    line-height: 1.55;
    margin: 0 auto 12px !important;
    max-width: 280px;
  }
  /* Social icons row */
  .footer-social {
    display: flex !important;
    justify-content: center;
    gap: 10px;
  }
  .footer-social a {
    width: 36px !important;
    height: 36px !important;
    border-radius: 999px !important;
    background: var(--color-gray-100) !important;
    border: 1px solid var(--color-footer-border) !important;
    color: var(--color-footer-text) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 14px !important;
    transition: all 0.15s;
  }
  .footer-social a:hover {
    background: var(--color-primary) !important;
    color: white !important;
    border-color: var(--color-primary) !important;
  }
  /* Footer link columns */
  .footer-title {
    font-size: 11px !important;
    letter-spacing: 1.5px;
    margin-bottom: 12px !important;
    color: var(--color-dark) !important;
    text-transform: uppercase;
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
  }
  .footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--color-primary);
  }
  .footer-links {
    display: flex !important;
    flex-direction: column;
    gap: 9px;
    list-style: none;
    padding: 0;
  }
  .footer-links a {
    font-size: 13px !important;
    color: var(--color-footer-muted) !important;
    padding: 0 !important;
    text-decoration: none;
    transition: color 0.15s, padding 0.15s;
  }
  .footer-links a:hover {
    color: var(--color-primary) !important;
    padding-left: 4px !important;
  }
  /* Contact items */
  .footer-contact-item {
    font-size: 12.5px !important;
    color: var(--color-footer-muted) !important;
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0;
  }
  .footer-contact-item i {
    color: var(--color-primary);
    margin-top: 3px;
    font-size: 11px;
    width: 14px;
    flex-shrink: 0;
  }
  /* Newsletter - full row at bottom */
  .footer-grid > div:last-child {
    grid-column: 1 / -1 !important;
    padding-top: 18px;
    border-top: 1px solid var(--color-footer-border);
  }
  .newsletter {
    background: var(--color-white) !important;
    border: 1px solid var(--color-footer-border) !important;
    border-radius: 999px !important;
    padding: 4px !important;
    margin-top: 10px !important;
  }
  .newsletter input {
    background: transparent !important;
    border: none !important;
    color: var(--color-dark) !important;
    padding: 9px 14px !important;
    font-size: 13px !important;
  }
  .newsletter input::placeholder { color: var(--color-gray-400) !important; }
  .newsletter button {
    background: var(--color-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 9px 16px !important;
    font-size: 11px !important;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  /* Bottom copyright bar */
  .footer-bottom {
    background: var(--color-gray-50);
    margin: 0 -16px;
    padding: 14px 16px !important;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 11px;
    color: var(--color-footer-muted);
    border-top: 1px solid var(--color-footer-border);
  }
  .footer-bottom a {
    color: var(--color-footer-text);
    text-decoration: none;
  }
  .payment-icons {
    display: flex;
    gap: 6px;
    justify-content: center;
  }
  .payment-icons span,
  .payment-icons img,
  .payment-icons div {
    background: var(--color-white);
    color: var(--color-footer-muted);
    border: 1px solid var(--color-footer-border);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
}
