/*
 * [Summary]: Main stylesheet cho mall_shopping — layout, header, footer + design tokens.
 * [Flow]:
 *   1. CSS variables — palette TransViet + semantic tokens (text/border/surface) + spacing/radius.
 *   2. Reset + base typography (Inter font, body color, link).
 *   3. Layout primitives — .container, .site (sticky-footer flex column).
 *   4. .announcement bar — yellow strip trên cùng.
 *   5. .site-header — sticky top, logo + nav (dropdown hover) + search + actions + hamburger mobile.
 *   6. .site-footer — blue dark, 4 cột top section + bottom strip copyright.
 *   7. Responsive: ≥1024 desktop full · 768–1023 tablet · <768 mobile (nav→hamburger).
 * [Notes]:
 *   - Palette do user cung cấp; mọi color reference qua CSS var, không hardcode HEX trong block.
 *   - Mobile nav toggle qua attribute `hidden`, script trong base.html.
 */

/* ─────────────────────────────────────────────────────────────
   1. Design tokens
   ───────────────────────────────────────────────────────────── */
:root {
  /* Palette TransViet (user-provided) */
  --BLUE: #005792;
  --BLUELIGHT: #28B0E5;
  --BLUELIGHT2: #D1F1FD;
  --BLUELIGHT3: #F2F9FF;
  --YELLOW: #FDC300;
  --PINK: #CA529C;
  --PURPLE: #7040CA;
  --YELLOWLIGHT: #FFFDED;
  --ORANGE: #FDC300;
  --GREENLIGHT: #7AC640;
  --RED: #E40406;
  --REDLIGHT: #FFEAEB;

  /* Semantic tokens (derived, không trong palette gốc) */
  --TEXT: #1a1a1a;
  --TEXT-MUTED: #6b7280;
  --TEXT-ON-DARK: rgba(255, 255, 255, 0.92);
  --TEXT-ON-DARK-MUTED: rgba(255, 255, 255, 0.72);
  --BORDER: #e5e7eb;
  --SURFACE: #ffffff;
  --BG: #ffffff;
  --BLUE-DARK: #003F6B;            /* footer bottom strip */

  /* Spacing & radius scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Header height — dùng để offset sticky main content nếu cần */
  --header-h: 64px;
}

/* ─────────────────────────────────────────────────────────────
   2. Reset + base
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--TEXT);
  background: var(--BG);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--BLUE); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ─────────────────────────────────────────────────────────────
   3. Layout primitives
   ───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site > main {
  flex: 1 0 auto;
  padding: var(--space-5) 0 var(--space-7);
}

/* ─────────────────────────────────────────────────────────────
   4. Announcement bar
   ───────────────────────────────────────────────────────────── */
.announcement {
  background: var(--YELLOW);
  color: var(--TEXT);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 8px var(--space-4);
  line-height: 1.4;
}
.announcement a { color: var(--BLUE); font-weight: 600; }

/* ─────────────────────────────────────────────────────────────
   5. Site header (sticky, dark blue, 2 rows — shopdunk-style)
   ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--BLUE);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ── Row 1: logo · search · actions · lang · hamburger ── */
.site-header__top { padding: 10px 0; }
.site-header__top-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

/* Logo composite — main "TransVietMALL" + divider + sub "Chính hãng / Toàn quốc" */
.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-header__logo-main {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}
.site-header__logo-main strong { color: var(--YELLOW); font-weight: 700; }
.site-header__logo-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.35);
}
.site-header__logo-sub {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
}

/* Search bar — big, centered, white pill */
.site-header__search {
  position: relative;
  flex: 1 1 auto;
  max-width: 720px;
  min-width: 0;
}
.site-header__search input {
  width: 100%;
  height: 44px;
  padding: 0 20px 0 48px;
  font-size: 14px;
  font-family: inherit;
  color: var(--TEXT);
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.site-header__search input::placeholder { color: var(--TEXT-MUTED); }
.site-header__search input:focus {
  border-color: var(--BLUELIGHT);
  box-shadow: 0 0 0 3px var(--BLUELIGHT2);
}
.site-header__search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--TEXT-MUTED);
  pointer-events: none;
}

/* Right-side actions */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}
.site-header__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  border-radius: var(--radius-md);
  transition: opacity 0.15s;
}
.site-header__action:hover { opacity: 0.85; }
.site-header__action > svg,
.site-header__action-icon > svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.site-header__action-icon { position: relative; display: inline-flex; }
.site-header__action-label { white-space: nowrap; }
.site-header__action .badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--RED);
  border: 1.5px solid var(--BLUE);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Language flags (decorative — i18n thực tế chưa làm) */
.site-header__lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: var(--space-2);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  margin-left: var(--space-2);
}
.site-header__lang .flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  border-radius: 2px;
  cursor: pointer;
}
.site-header__lang .flag-vn { background: var(--RED); }
.site-header__lang .flag-en { background: #1e40af; opacity: 0.7; }
.site-header__lang .flag-en:hover { opacity: 1; }

/* ── Row 2: services pill + horizontal category nav ── */
.site-header__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 0 10px;
}
.site-header__bottom-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: nowrap;
  min-height: 44px;
}

/* "Dịch vụ" pill — light surface, blue text, eye-catching */
.site-header__services {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--BLUE);
  background: #fff;
  border: none;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.site-header__services svg { width: 16px; height: 16px; }
.site-header__services:hover { background: var(--YELLOW); }

/* Nav items on row 2 */
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-header__nav::-webkit-scrollbar { display: none; }
.site-header__nav-item-wrap { position: relative; }
.site-header__nav-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.site-header__nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.site-header__nav-item .caret { font-size: 9px; opacity: 0.7; }

/* Dropdown panel — white card on dark header */
.site-header__nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: #fff;
  color: var(--TEXT);
  border: 1px solid var(--BORDER);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  padding: var(--space-2);
  display: none;
  z-index: 60;
}
.site-header__nav-item-wrap:hover > .site-header__nav-dropdown,
.site-header__nav-item-wrap:focus-within > .site-header__nav-dropdown {
  display: block;
}
.site-header__nav-dropdown a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--TEXT);
  border-radius: var(--radius-sm);
}
.site-header__nav-dropdown a:hover {
  background: var(--BLUELIGHT3);
  color: var(--BLUE);
}

/* Hamburger (mobile, hidden on desktop) */
.site-header__hamburger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.site-header__hamburger:hover { background: rgba(255, 255, 255, 0.1); }
.site-header__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}
.site-header__hamburger span + span { margin-top: 5px; }

/* Mobile nav panel */
.site-header__mobile-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--BLUE);
  padding: var(--space-2) 0 var(--space-3);
}
.site-header__mobile-nav .container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-header__mobile-nav a {
  display: block;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-md);
}
.site-header__mobile-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.site-header__mobile-nav a.indent {
  padding-left: 28px;
  font-weight: 400;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ─────────────────────────────────────────────────────────────
   6. Site footer (dark blue)
   ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--BLUE);
  color: var(--TEXT-ON-DARK);
  margin-top: auto;
}
.site-footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-6);
  padding: var(--space-7) 0;
}
.site-footer__logo {
  display: inline-block;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}
.site-footer__logo span { color: var(--YELLOW); }
.site-footer__col h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin: 0 0 var(--space-4);
}
.site-footer__col p {
  margin: 0 0 var(--space-3);
  font-size: 14px;
  line-height: 1.65;
  color: var(--TEXT-ON-DARK-MUTED);
}
.site-footer__col a {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--TEXT-ON-DARK-MUTED);
}
.site-footer__col a:hover { color: var(--YELLOW); }

.site-footer__social {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.site-footer__social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.site-footer__social a:hover {
  background: var(--YELLOW);
  color: var(--BLUE);
  border-color: var(--YELLOW);
}

.site-footer__bottom {
  background: var(--BLUE-DARK);
  padding: var(--space-4) 0;
}
.site-footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: 13px;
  color: var(--TEXT-ON-DARK-MUTED);
}
.site-footer__payment {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.site-footer__payment span {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────
   7. Responsive
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .site-header__top-inner { gap: var(--space-3); }
  .site-header__bottom { display: none; }
  .site-header__hamburger { display: inline-flex; }
  .site-header__action-label,
  .site-header__logo-divider,
  .site-header__logo-sub,
  .site-header__lang { display: none; }
}
@media (max-width: 768px) {
  .site-header__top { padding: 8px 0; }
  .site-header__top-inner { flex-wrap: wrap; gap: var(--space-2); }
  .site-header__search { order: 99; flex-basis: 100%; max-width: 100%; }
  .site-header__search input { height: 40px; }
  .site-header__logo-main { font-size: 18px; }
  .site-header__action-icon > svg,
  .site-header__action > svg { width: 22px; height: 22px; }
  .announcement { font-size: 12px; padding: 6px var(--space-3); }
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: var(--space-5); padding: var(--space-6) 0; }
  .site-footer__bottom-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .site-footer__top { grid-template-columns: 1fr; }
  .site-header__actions { gap: var(--space-3); }
  .site-header__action-icon > svg,
  .site-header__action > svg { width: 20px; height: 20px; }
}

/* ─────────────────────────────────────────────────────────────
   8. Hero slider (home page)
   ───────────────────────────────────────────────────────────── */
.hero-slider {
  position: relative;
  margin: var(--space-4) 0 var(--space-7);
  border-radius: 24px;
}
.hero-slider__viewport {
  overflow: hidden;
  border-radius: 24px;
}
.hero-slider__track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* ── Single slide ── */
.hero-slide {
  flex: 0 0 100%;
  min-width: 0;
  position: relative;
  padding: 48px 64px 56px;
  border-radius: 24px;
  min-height: 380px;
}
/* Themed backgrounds — sky/purple/golden gradient */
.hero-slide--sky {
  background:
    radial-gradient(circle at 20% 8%, #fff 0%, transparent 16%),
    radial-gradient(circle at 78% 12%, #fff 0%, transparent 14%),
    linear-gradient(180deg, #b6e5f8 0%, #d8eef9 45%, #fde9c5 78%, #f9d5a0 100%);
}
.hero-slide--purple {
  background:
    radial-gradient(circle at 18% 10%, #fff 0%, transparent 18%),
    radial-gradient(circle at 75% 14%, #fff 0%, transparent 14%),
    linear-gradient(180deg, #ddc9f0 0%, #ebdcf6 45%, #f5e4d8 78%, #f3d0c0 100%);
}
.hero-slide--golden {
  background:
    radial-gradient(circle at 20% 12%, #fff 0%, transparent 16%),
    radial-gradient(circle at 76% 8%, #fff 0%, transparent 14%),
    linear-gradient(180deg, #fdedb5 0%, #fdf4d0 45%, #fbe2c2 78%, #f9cd9a 100%);
}

.hero-slide__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.1fr;
  align-items: center;
  gap: var(--space-5);
  height: 100%;
}

/* Left column — heading + product label */
.hero-slide__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.hero-slide__heading {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--BLUE);
}
.hero-slide__product {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--BLUE);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-slide__product .apple { font-size: 22px; line-height: 1; }

/* Center column — product placeholder (5 CSS "phones") */
.hero-slide__media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-slide__devices {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18));
}
.hero-slide__device {
  width: 56px;
  height: 240px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  position: relative;
}
.hero-slide__device::after {
  /* camera bump */
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
}
.hero-slide__device--wide { width: 180px; height: 120px; border-radius: 12px; }
.hero-slide__device--wide::after { display: none; }

/* iPhone color variants */
.hero-slide__device--black   { background: linear-gradient(135deg, #1f1f1f, #3a3a3a); }
.hero-slide__device--white   { background: linear-gradient(135deg, #f7f6f1, #dedbcf); }
.hero-slide__device--green   { background: linear-gradient(135deg, #a3cf94, #6fa765); }
.hero-slide__device--blue    { background: linear-gradient(135deg, #b8d4e8, #8ab7d6); }
.hero-slide__device--purple  { background: linear-gradient(135deg, #d3b6e0, #b18ac5); }
/* Samsung */
.hero-slide__device--titan     { background: linear-gradient(135deg, #cfd1cf, #98999b); }
.hero-slide__device--graphite  { background: linear-gradient(135deg, #4f5256, #2e3033); }
.hero-slide__device--lavender  { background: linear-gradient(135deg, #c8b9d8, #9c8db5); }
.hero-slide__device--mint      { background: linear-gradient(135deg, #b8e0c8, #87bd9d); }
/* MacBook */
.hero-slide__device--silver    { background: linear-gradient(135deg, #e7e8ea, #b9bcc1); }
.hero-slide__device--spacegray { background: linear-gradient(135deg, #54565a, #2a2c30); }

/* Right column — promo card */
.hero-slide__promo {
  position: relative;
  padding: 22px 22px 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-slide__promo-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-4);
}
.hero-slide__promo-price .label {
  font-size: 13px;
  color: var(--TEXT);
  font-weight: 500;
}
.hero-slide__promo-price .amount {
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--BLUELIGHT) 0%, var(--BLUE) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--BLUE); /* fallback */
}

.hero-slide__promo-perks {
  display: flex;
  align-items: stretch;
  padding: var(--space-3) 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.hero-slide__promo-perks .perk {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 6px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}
.hero-slide__promo-perks .perk:last-child { border-right: none; }
.hero-slide__promo-perks .perk__label {
  font-size: 10px;
  color: var(--TEXT-MUTED);
  font-weight: 500;
  line-height: 1.3;
}
.hero-slide__promo-perks .perk__value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--BLUE);
}
.hero-slide__promo-date {
  text-align: center;
  font-size: 12px;
  color: var(--TEXT-MUTED);
  margin: var(--space-3) 0 0;
}
.hero-slide__disclaimer {
  position: absolute;
  bottom: 14px;
  right: 28px;
  font-size: 11px;
  color: var(--TEXT-MUTED);
  font-style: italic;
  margin: 0;
}

/* Nav arrows */
.hero-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: var(--TEXT);
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.15s, transform 0.15s;
}
.hero-slider__nav:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.hero-slider__nav svg { width: 22px; height: 22px; }
.hero-slider__nav--prev { left: 12px; }
.hero-slider__nav--next { right: 12px; }

/* Dot pagination */
.hero-slider__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.hero-slider__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: width 0.25s, background-color 0.25s;
}
.hero-slider__dots button.is-active {
  width: 26px;
  background: var(--BLUE);
}

/* Responsive */
@media (max-width: 1023px) {
  .hero-slide { padding: 36px 36px 48px; min-height: 320px; }
  .hero-slide__inner { grid-template-columns: 1fr 1fr; }
  .hero-slide__media { display: none; }
  .hero-slide__heading { font-size: 28px; }
  .hero-slide__product { font-size: 20px; }
}
@media (max-width: 768px) {
  .hero-slide { padding: 24px 20px 56px; min-height: auto; }
  .hero-slide__inner { grid-template-columns: 1fr; gap: var(--space-4); }
  .hero-slide__heading { font-size: 22px; }
  .hero-slide__product { font-size: 17px; }
  .hero-slide__promo { padding: 16px 14px 14px; }
  .hero-slide__promo-price .amount { font-size: 34px; }
  .hero-slide__promo-perks .perk__value { font-size: 15px; }
  .hero-slider__nav { display: none; }
  .hero-slide__disclaimer { position: static; text-align: right; margin-top: var(--space-3); }
}

/* ─────────────────────────────────────────────────────────────
   9. Hot products section (home page)
   ───────────────────────────────────────────────────────────── */
.hot-products {
  position: relative;
  background: var(--BLUE);
  border-radius: 24px;
  padding: 52px var(--space-4) var(--space-5);
  margin: var(--space-7) 0;
}

/* Title pill — overlap top edge, light blue */
.hot-products__title {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 36px;
  font-size: 16px;
  font-weight: 600;
  color: var(--BLUE);
  background: linear-gradient(180deg, #fff 0%, var(--BLUELIGHT2) 100%);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}
.hot-products__title-fire { font-size: 18px; line-height: 1; }

/* Grid */
.hot-products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

/* Single card */
.hot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-3) var(--space-4);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* "Giảm X%" badge — red flag top-left */
.hot-card__badge-discount {
  position: absolute;
  top: 0;
  left: var(--space-3);
  padding: 6px 12px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--RED);
  border-radius: 0 0 4px 4px;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  letter-spacing: 0.02em;
}

/* "Mới" badge — green outline pill top-right */
.hot-card__badge-new {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--GREENLIGHT);
  background: #fff;
  border: 1.5px solid var(--GREENLIGHT);
  border-radius: var(--radius-pill);
  z-index: 2;
}
.hot-card__badge-new svg { width: 12px; height: 12px; }

/* Product image area */
.hot-card__image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  margin: var(--space-5) 0 var(--space-3);
  overflow: hidden;
}
.hot-card__image img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
/* Placeholder khi không có img — phone silhouette CSS */
.hot-card__image-placeholder {
  width: 110px;
  height: 180px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef2f7, #cbd5e1);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
}
.hot-card__image-placeholder::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

/* Name */
.hot-card__name {
  margin: 0 0 var(--space-3);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--TEXT);
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hot-card__name a { color: inherit; }
.hot-card__name a:hover { color: var(--BLUE); }

/* Price row — sale + strike-through original */
.hot-card__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
}
.hot-card__price-sale {
  font-size: 17px;
  font-weight: 700;
  color: var(--BLUE);
  letter-spacing: -0.01em;
}
.hot-card__price-original {
  font-size: 13px;
  color: var(--TEXT-MUTED);
  text-decoration: line-through;
}

/* Responsive */
@media (max-width: 1023px) {
  .hot-products__grid { grid-template-columns: repeat(2, 1fr); }
  .hot-products { padding: 48px var(--space-3) var(--space-4); }
}
@media (max-width: 480px) {
  .hot-products__grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .hot-card__image { height: 180px; }
  .hot-products__title { font-size: 14px; padding: 9px 24px; top: -20px; }
}

/* ─────────────────────────────────────────────────────────────
   10. Product list section (home — full catalog với filter tabs)
   ───────────────────────────────────────────────────────────── */
.product-list {
  margin: var(--space-7) 0;
}

/* Filter tabs row */
.product-list__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-5);
}
.product-list__tabs .tab {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--TEXT);
  background: #fff;
  border: 1px solid var(--BORDER);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.product-list__tabs .tab:hover {
  border-color: var(--BLUE);
  color: var(--BLUE);
}
.product-list__tabs .tab.is-active {
  background: #fff;
  border-color: var(--TEXT);
  color: var(--TEXT);
  font-weight: 600;
}

/* Grid — same column setup as HOT but with border on cards (nền trắng) */
.product-list__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.product-list__grid .hot-card {
  border: 1px solid var(--BORDER);
}
.product-list__grid .hot-card:hover {
  border-color: transparent;
}

/* Empty state placeholder (khi seed chưa load) */
.empty-state {
  padding: var(--space-6);
  background: #fff;
  border: 1px dashed var(--BORDER);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--TEXT-MUTED);
}
.empty-state pre {
  display: inline-block;
  text-align: left;
  padding: var(--space-3);
  background: #f9fafb;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--TEXT);
  overflow-x: auto;
  max-width: 100%;
  margin-top: var(--space-2);
}

@media (max-width: 1023px) {
  .product-list__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .product-list__grid { grid-template-columns: 1fr; }
  .product-list__tabs .tab { padding: 7px 14px; font-size: 12px; }
}

/* ─────────────────────────────────────────────────────────────
   11. Reviews section (home — đánh giá danh mục)
   ───────────────────────────────────────────────────────────── */
.reviews {
  margin: var(--space-7) 0;
  padding: var(--space-5) var(--space-6) var(--space-6);
  background: #fff;
  border: 1px solid var(--BORDER);
  border-radius: var(--radius-lg);
}
.reviews__title {
  margin: 0 0 var(--space-4);
  font-size: 22px;
  font-weight: 700;
  color: var(--TEXT);
}
.reviews__body {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-6);
  border-top: 1px solid var(--BORDER);
  padding-top: var(--space-5);
}

/* Star color helper — dùng cho tất cả ★ trong section */
.reviews .star,
.reviews__star { color: var(--YELLOW); font-size: 14px; line-height: 1; }
.reviews__item-stars .star { font-size: 14px; }

/* ── Left: summary (rating + form) ── */
.reviews__summary {
  padding-right: var(--space-5);
  border-right: 1px solid var(--BORDER);
}

/* Average score + distribution bars */
.reviews__average {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: start;
  margin-bottom: var(--space-6);
}
.reviews__average-score {
  text-align: center;
  padding-top: 4px;
}
.reviews__average-score .num {
  display: block;
  font-size: 52px;
  font-weight: 700;
  color: var(--TEXT);
  line-height: 1;
}
.reviews__average-score .label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--TEXT-MUTED);
}
.reviews__distribution {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reviews__bar {
  display: grid;
  grid-template-columns: 12px 14px 1fr;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--TEXT);
}
.reviews__bar-fill {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.reviews__bar-fill > span {
  display: block;
  height: 100%;
  background: var(--YELLOW);
  border-radius: 999px;
}

/* Form */
.reviews__form-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--TEXT);
  margin: 0 0 var(--space-3);
}
.reviews__form-row { margin-bottom: var(--space-3); }
.reviews__form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--TEXT);
  margin-bottom: 6px;
}
.reviews__form-label .req { color: var(--RED); margin-left: 2px; }
.reviews__stars-input {
  display: inline-flex;
  gap: 1px;
}
.reviews__stars-input .star { font-size: 18px; }

.reviews__form input[type="text"],
.reviews__form textarea {
  width: 100%;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--TEXT);
  background: #fff;
  border: 1px solid var(--BORDER);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s;
}
.reviews__form input[type="text"]:focus,
.reviews__form textarea:focus { border-color: var(--BLUE); }
.reviews__form textarea { min-height: 60px; resize: vertical; }

.reviews__upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-3);
  font-size: 13px;
  font-weight: 500;
  color: var(--BLUE);
  cursor: pointer;
}
.reviews__upload svg { width: 16px; height: 16px; }
.reviews__upload:hover { text-decoration: underline; }

/* reCAPTCHA mock — visual only */
.reviews__captcha {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  max-width: 290px;
  background: #fafbfc;
  border: 1px solid #d3d4d8;
  border-radius: 4px;
  margin-bottom: var(--space-3);
}
.reviews__captcha input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
}
.reviews__captcha-label {
  flex: 1;
  font-size: 13px;
  color: var(--TEXT);
  line-height: 1.3;
}
.reviews__captcha-logo {
  font-size: 9px;
  color: var(--TEXT-MUTED);
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
}

.reviews__submit {
  padding: 10px 36px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--BLUE);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s;
}
.reviews__submit:hover { background: var(--BLUE-DARK); }

/* ── Right: list reviews ── */
.reviews__list {
  display: flex;
  flex-direction: column;
}
.reviews__item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--BORDER);
}
.reviews__item:first-child { padding-top: 0; }
.reviews__item:last-child { border-bottom: none; padding-bottom: 0; }
.reviews__item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.reviews__avatar {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  border-radius: var(--radius-pill);
  color: #9ca3af;
  flex-shrink: 0;
}
.reviews__avatar svg { width: 18px; height: 18px; }
.reviews__item-name { font-weight: 600; color: var(--TEXT); font-size: 14px; }
.reviews__item-date { color: var(--TEXT-MUTED); font-size: 13px; }
.reviews__item-stars {
  display: inline-flex;
  gap: 1px;
  margin: 2px 0 4px 42px;
}
.reviews__item-content {
  margin: 0 0 0 42px;
  font-size: 14px;
  color: var(--TEXT);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 1023px) {
  .reviews { padding: var(--space-4) var(--space-4) var(--space-5); }
  .reviews__body { grid-template-columns: 1fr; gap: var(--space-5); }
  .reviews__summary {
    border-right: none;
    border-bottom: 1px solid var(--BORDER);
    padding-right: 0;
    padding-bottom: var(--space-5);
  }
}
@media (max-width: 480px) {
  .reviews__title { font-size: 18px; }
  .reviews__average-score .num { font-size: 42px; }
}
