/* ============================================================
   Xinh Vibe — site.css (R3, redesign theo Coolmate v2)
   Token mapping: handoff-spec-v2.md §1. Mobile-first,
   breakpoint desktop tại 1024px. Zero framework.
   ============================================================ */

:root {
  /* Màu */
  --pink: #E8527A;
  --pink-deep: #C93A62;
  --pink-light: #FDF0F4;
  --ink: #1C1418;
  --ink-mid: #6B5460;
  --ink-light: #A8909A;
  --cream: #FBF7F5;
  --white: #FFFFFF;
  --img-bg: #F5EEF1;
  --border: rgba(28, 20, 24, 0.09);
  --gold: #C9974A;
  --state-error: var(--pink-deep);
  --border-error: var(--pink-deep);

  /* Radius */
  --radius-card: 14px;
  --radius-button: 8px;
  --radius-pill: 20px;

  /* Shadow */
  --shadow-card-hover: 0 8px 24px rgba(28, 20, 24, 0.10);
  --shadow-md: 0 12px 32px rgba(28, 20, 24, 0.14);
  --focus-ring: 0 0 0 3px rgba(232, 82, 122, 0.25);

  /* Motion */
  --duration-standard: 220ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);

  /* Font */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
[hidden] { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; }
.display { font-family: var(--font-display); font-weight: 700; }
.hide-desktop { display: block; }
.hide-mobile { display: none; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--border); }
.header-inner { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; padding: 8px 16px; }
.header-menu-btn { grid-column: 1; justify-self: start; }
.icon-btn {
  width: 36px; height: 36px; border: none; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); border-radius: var(--radius-button); flex: none;
}
.icon-btn:hover { background: var(--pink-light); }
.icon-btn svg { width: 18px; height: 18px; }
.header-logo-link { grid-column: 2; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1; }
.header-logo-icon { height: 26px; width: auto; display: block; }
.header-logo-text { font: 800 11px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.header-nav { display: none; }
.header-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 2px; }
.header-cart { position: relative; display: inline-flex; }
.header-cart .cart-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--pink); color: #fff; border-radius: 50%;
  min-width: 16px; height: 16px; font: 600 10px/16px var(--font-body); text-align: center; padding: 0 3px;
  pointer-events: none;
}
.header-cart .cart-badge[hidden] { display: none; }

/* ---------- Header search ---------- */
.search-panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 55;
  background: var(--white); box-shadow: var(--shadow-md); border-bottom: 1px solid var(--border);
}
.search-panel-inner { padding: 12px 16px; }
.search-input-row {
  display: flex; align-items: center; gap: 8px; background: #F4F1EF; border-radius: var(--radius-pill);
  padding: 0 14px; height: 44px;
}
.search-input-icon { width: 16px; height: 16px; color: var(--ink-light); flex: none; }
.search-input { flex: 1; min-width: 0; border: none; background: none; outline: none; font: 400 14px var(--font-body); color: var(--ink); height: 100%; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-close { width: 28px; height: 28px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; color: var(--ink-mid); }
.search-close svg { width: 14px; height: 14px; }
.search-results { margin-top: 8px; max-height: 60vh; overflow-y: auto; }
.search-result { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.search-result-img { width: 56px; height: 74px; border-radius: 8px; overflow: hidden; flex: none; background: var(--img-bg); }
.search-result-img img { width: 100%; height: 100%; object-fit: cover; }
.search-result-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.search-result-name { font: 500 13px/1.35 var(--font-body); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result .price-sale { font-size: 13px; }
.search-empty { padding: 20px 4px; font: 400 13px var(--font-body); color: var(--ink-mid); text-align: center; }

/* ---------- Marquee strip ---------- */
.marquee { background: var(--ink); overflow: hidden; white-space: nowrap; padding: 7px 0; }
.marquee-track { display: inline-block; animation: xv-marquee 18s linear infinite; font: 500 11px/1 var(--font-body); color: #fff; letter-spacing: .02em; }
@keyframes xv-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Trust banner tĩnh (thay marquee ở /gio-hang/) */
.cart-trust-banner {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--pink-light);
}
.cart-trust-banner svg { width: 16px; height: 16px; color: var(--pink); flex: none; }
.cart-trust-banner span { font: 400 12px/1.4 var(--font-body); color: var(--ink); }

/* ---------- Drawer ---------- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(28, 20, 24, 0.45);
  z-index: 60; opacity: 0; visibility: hidden;
  transition: opacity var(--duration-standard) var(--ease-standard), visibility var(--duration-standard);
}
.drawer-panel {
  position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 86vw;
  background: var(--white); box-shadow: var(--shadow-md); z-index: 70;
  display: flex; flex-direction: column; padding: 20px 0;
  transform: translateX(-100%);
  transition: transform var(--duration-standard) var(--ease-standard);
}
body.drawer-open .drawer-scrim { opacity: 1; visibility: visible; }
body.drawer-open .drawer-panel { transform: translateX(0); }
body.drawer-open { overflow: hidden; }
.drawer-brand { padding: 0 20px 20px; }
.drawer-brand img { height: 34px; width: auto; }
.drawer-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.drawer-body a {
  padding: 13px 20px; font: 500 17px/1.3 var(--font-body); color: var(--ink);
  border-left: 3px solid transparent;
}
.drawer-body a.active { font-weight: 700; color: var(--pink-deep); border-left-color: var(--pink); }
.drawer-foot {
  padding: 16px 20px 0; border-top: 1px solid var(--border); margin-top: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.drawer-foot .drawer-info { display: flex; align-items: center; gap: 8px; font: 400 13px var(--font-body); color: var(--ink); }
.drawer-foot .drawer-info svg { width: 14px; height: 14px; color: var(--pink); }
.drawer-foot .drawer-info.muted { color: var(--ink-mid); }

/* ---------- Cart drawer (desktop) / bottom sheet (mobile) ---------- */
.cartdrawer-scrim {
  position: fixed; inset: 0; background: rgba(28, 20, 24, 0.45);
  z-index: 60; opacity: 0; visibility: hidden;
  transition: opacity var(--duration-standard) var(--ease-standard), visibility var(--duration-standard);
}
.cartdrawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--white); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  max-height: 75vh; border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform var(--duration-standard) var(--ease-standard);
}
body.cartdrawer-open .cartdrawer-scrim { opacity: 1; visibility: visible; }
body.cartdrawer-open .cartdrawer { transform: translateY(0); }
body.cartdrawer-open { overflow: hidden; }
.cartdrawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; border-bottom: 1px solid var(--border); flex: none; }
.cartdrawer-title { font: 700 16px var(--font-display); color: var(--ink); }
.cartdrawer-body { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.cartdrawer-foot { flex: none; padding: 14px 16px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.cartdrawer-ship { display: flex; align-items: center; gap: 8px; font: 400 12px var(--font-body); color: var(--ink-mid); }
.cartdrawer-ship svg { width: 16px; height: 16px; color: var(--pink); flex: none; }
.cartdrawer-total-row { display: flex; align-items: center; justify-content: space-between; }
.cartdrawer-total-row span:first-child { font: 600 14px var(--font-body); color: var(--ink); }
.cartdrawer-total { font: 700 20px var(--font-body); color: var(--ink); }
.cartdrawer-line { display: flex; gap: 10px; }
.cartdrawer-line-thumb { width: 56px; height: 74px; border-radius: 8px; overflow: hidden; flex: none; background: var(--img-bg); }
.cartdrawer-line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cartdrawer-line-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cartdrawer-line-top { display: flex; gap: 8px; }
.cartdrawer-line-name { flex: 1; min-width: 0; font: 500 13px/1.35 var(--font-body); color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cartdrawer-line-remove { flex: none; width: 24px; height: 24px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-light); }
.cartdrawer-line-remove svg { width: 14px; height: 14px; }
.cartdrawer-line-variant { font: 400 12px var(--font-body); color: var(--ink-mid); }
.cartdrawer-line-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cartdrawer-line-price { font: 600 13px var(--font-body); color: var(--ink); }
.cartdrawer-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 32px 16px; }
.cartdrawer-empty svg { width: 40px; height: 40px; color: var(--ink-light); opacity: 0.5; }
.cartdrawer-empty p { font: 500 14px var(--font-body); color: var(--ink-mid); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--radius-button);
  font: 600 15px/1 var(--font-body); cursor: pointer; border: 1px solid transparent;
  transition: background var(--duration-standard) var(--ease-standard), transform 120ms var(--ease-standard);
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--pink); color: #fff; border-color: var(--pink); }
.btn-primary:hover { background: var(--pink-deep); border-color: var(--pink-deep); }
.btn-secondary { background: transparent; color: var(--pink); border-color: var(--pink); }
.btn-secondary:hover { background: var(--pink-light); }
.btn-full { width: 100%; }
.btn-disabled, .btn:disabled {
  background: var(--pink-light); color: var(--ink-light);
  border-color: var(--border); cursor: not-allowed;
}
.btn-disabled:hover, .btn:disabled:hover { background: var(--pink-light); }

/* ---------- Hero (home) ---------- */
.hero-mobile { position: relative; height: 460px; overflow: hidden; background: var(--img-bg); }
.hero-mobile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-mobile .hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,20,24,0) 35%, rgba(28,20,24,0.55) 100%); }
.hero-mobile .hero-content { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero-eyebrow { font: 600 12px/1 var(--font-body); color: #F8D9E3; letter-spacing: .12em; }
.hero-title { margin: 0; font: 700 28px/1.2 var(--font-display); color: #fff; max-width: 300px; }
.hero-title em { font-style: italic; color: #F8A8C0; }
.hero-sub { font: 400 13px/1.5 var(--font-body); color: rgba(255,255,255,0.75); }
.hero-cta {
  margin-top: 2px; display: inline-flex; align-items: center; font: 600 13px var(--font-body);
  color: #fff; background: var(--pink); border: none; border-radius: var(--radius-pill);
  padding: 10px 22px; cursor: pointer; transition: background-color 140ms var(--ease-standard), transform 140ms var(--ease-standard);
}
.hero-cta:hover { background: var(--pink-deep); }
.hero-cta:active { transform: scale(0.98); }
.hero-desktop { display: none; }

/* ---------- Category circle strip (home) ---------- */
.cat-circle-strip { padding: 20px 16px 0; display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.cat-circle-strip::-webkit-scrollbar { display: none; }
.cat-circle { flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.cc-img {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 2px solid var(--pink-light);
  background: var(--img-bg); display: flex; align-items: center; justify-content: center;
}
.cc-img img { width: 100%; height: 100%; object-fit: cover; }
.cc-img.cc-icon svg { width: 24px; height: 24px; color: var(--pink); }
.cc-label { font: 500 12px var(--font-body); color: var(--ink); white-space: nowrap; }

/* ---------- Category tiles (home) ---------- */
.tile-grid { padding: 32px 16px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1/1; cursor: pointer; display: block; background: var(--pink-light); }
.tile.has-img { background: var(--img-bg); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-standard) var(--ease-standard); }
.tile .tile-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,20,24,0) 40%, rgba(28,20,24,0.55) 100%); }
.tile .tile-label { position: absolute; left: 12px; bottom: 12px; right: 12px; font: 700 15px var(--font-body); color: #fff; }
.tile.no-img .tile-label { color: var(--pink-deep); position: static; text-align: center; }
.tile.no-img { display: flex; align-items: center; justify-content: center; padding: 16px; }
.tile:hover img { transform: scale(1.04); }

/* ---------- Section title ---------- */
.section { padding: 32px 16px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.section-title { margin: 0; font: 700 21px var(--font-display); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.section-more { font: 600 13px var(--font-body); color: var(--pink-deep); cursor: pointer; white-space: nowrap; flex: none; }

/* ---------- Product grid + card ---------- */
.product-grid { padding: 0 16px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.pcard { display: flex; flex-direction: column; cursor: pointer; color: inherit; }
.pcard-img { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 3/4; background: var(--img-bg); }
.pcard-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-standard) var(--ease-standard); }
.pcard-img-hover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--duration-standard) var(--ease-standard); pointer-events: none; }
.pcard-quickadd {
  position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; border: none;
  background: #fff; box-shadow: 0 2px 8px rgba(28,20,24,0.22); display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
}
.pcard-quickadd svg { width: 14px; height: 14px; color: var(--ink); }
.pcard-swatches { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.swatch-sm {
  width: 32px; height: 20px; border-radius: 999px; padding: 2px; cursor: pointer; flex: none;
  border: none; background: none; box-sizing: border-box;
}
.swatch-dot { display: block; width: 100%; height: 100%; border-radius: 999px; border: 1px solid var(--border); }
.swatch-sm.active .swatch-dot, .swatch-lg.active .swatch-dot { box-shadow: 0 0 0 2px var(--white), 0 0 0 3.5px var(--pink-deep); }
.swatch-more { width: 28px; height: 20px; border-radius: 6px; background: #F4F1EF; display: flex; align-items: center; justify-content: center; font: 600 10px var(--font-body); color: var(--ink-mid); flex: none; }
.pcard-name {
  font: 500 14px/1.4 var(--font-body); color: var(--ink); margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px;
}
.pcard-price { margin-top: 4px; }
.pcard-sold { font: 400 11px var(--font-body); color: var(--ink-mid); margin-top: 2px; }
.pcard-viewall {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  aspect-ratio: 3/4; border-radius: 14px; background: var(--pink-light); cursor: pointer; text-align: center; padding: 16px;
}
.pcard-viewall span { font: 600 14px/1.4 var(--font-body); color: var(--pink-deep); }

/* Price */
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-sale { font: 700 16px/1.2 var(--font-body); color: var(--pink); }
.price-original { font: 400 13px/1.2 var(--font-body); color: var(--ink-light); text-decoration: line-through; }
.off-pill, .pd-sale-badge {
  align-self: center; background: var(--pink-light); color: var(--pink-deep);
  font: 600 11px var(--font-body); padding: 3px 7px; border-radius: 6px;
}
.pd-sale-badge:empty { display: none; }

/* Badges */
.badge-hot {
  position: absolute; top: 8px; right: 8px; color: #fff; font: 700 10px/1 var(--font-body);
  padding: 4px 7px; border-radius: 6px; height: 22px; display: inline-flex; align-items: center; z-index: 2;
  background: var(--gold);
}

/* Sold-out badge (cấp sản phẩm) — card vẫn click được, chỉ mờ ảnh + ẩn quick-add */
.pcard-oos .pcard-img img { opacity: 0.55; }
/* Ảnh hover phải GIỮ ẨN trên card hết hàng: rule mờ ở trên (0,2,1) đè opacity:0
   của .pcard-img-hover (0,1,0) → 2 ảnh mờ chồng nhau. (0,3,1) thắng cả :hover. */
.pcard-oos .pcard-img img.pcard-img-hover { opacity: 0; }
.pcard-oos .pcard-quickadd { display: none; }
.badge-oos {
  position: absolute; top: 8px; left: 8px; color: #fff; font: 700 10px/1 var(--font-body);
  padding: 4px 7px; border-radius: 6px; height: 22px; display: inline-flex; align-items: center; z-index: 2;
  background: var(--ink);
}

/* ---------- Trust (home strip) ---------- */
.trust-scroll { padding: 32px 0 0; display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.trust-scroll::-webkit-scrollbar { display: none; }
.trust-scroll .trust-card {
  flex: none; width: 138px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); margin-left: 16px;
}
.trust-scroll .trust-card:last-child { margin-right: 16px; }
.trust-scroll .trust-card svg { width: 20px; height: 20px; color: var(--pink); }
.trust-scroll .trust-card span { font: 500 13px/1.35 var(--font-body); color: var(--ink); }

/* ---------- Trust grid (product page, 2x2 pink-tint) ---------- */
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trust-cell { background: var(--pink-light); border-radius: 12px; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.trust-cell svg { width: 20px; height: 20px; color: var(--pink); }
.trust-cell span { font: 400 12px/1.4 var(--font-body); color: var(--ink); }

/* ---------- Brand story ---------- */
.brand-story { margin-top: 32px; background: var(--pink-light); padding: 32px 16px; }
.brand-story-img { border-radius: 14px; overflow: hidden; aspect-ratio: 16/10; margin-bottom: 20px; background: var(--img-bg); }
.brand-story-img img { width: 100%; height: 100%; object-fit: cover; }
.brand-story p { font: 400 14px/1.6 var(--font-body); color: var(--ink-mid); margin-bottom: 14px; }
.brand-story a { font: 600 13px var(--font-body); color: var(--pink-deep); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #fff; padding: 40px 20px 28px; text-align: center; }
.footer-brand-col { display: flex; flex-direction: column; align-items: center; }
.footer-logo-lockup { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.footer-logo { display: block; height: 42px; width: auto; }
.footer-logo-text { font: 800 18px/1 var(--font-display); letter-spacing: .09em; text-transform: uppercase; color: #fff; }
.footer-contact { font: 400 15px/1.8 var(--font-body); color: rgba(255,255,255,0.78); margin: 0 auto 22px; max-width: 300px; }
.footer-brand-col p { max-width: 300px; margin: 0 auto; }
.footer-links { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; }
.footer-links span, .footer-links a { font: 400 15px var(--font-body); color: rgba(255,255,255,0.85); }
.footer-copy { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 18px; font: 400 13px var(--font-body); letter-spacing: .02em; color: rgba(255,255,255,0.55); text-align: center; }

/* Footer minimal (cart/thanh-toan) */
.footer-min { background: var(--ink); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 10px; }
.footer-min .fm-hotline { font: 400 13px var(--font-body); color: rgba(255,255,255,0.85); }
.footer-min .fm-links { font: 400 12px var(--font-body); color: rgba(255,255,255,0.55); }

/* ---------- Breadcrumb / category header ---------- */
.breadcrumb { padding: 12px 16px 0; display: flex; align-items: center; gap: 6px; font: 400 12px var(--font-body); color: var(--ink-light); }
.breadcrumb svg { width: 12px; height: 12px; }
.breadcrumb .current { color: var(--ink-mid); }
.cat-header { padding: 14px 16px 0; display: flex; align-items: baseline; gap: 8px; }
.cat-header h1 { margin: 0; font: 700 24px/1.25 var(--font-display); color: var(--ink); }
.cat-header .count { font: 400 12px var(--font-body); color: var(--ink-mid); }
.chip-row { padding: 14px 16px 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 16px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; font: 500 13px/1 var(--font-body);
  background: var(--pink-light); color: var(--ink-mid); border: 1px solid transparent; cursor: pointer;
  white-space: nowrap;
}
.chip.active { background: var(--pink); color: #fff; }

/* ---------- Category toolbar (filter/sort) ---------- */
.cat-toolbar { padding: 0 16px 16px; display: flex; gap: 10px; }
.cat-select {
  flex: 1; min-width: 0; height: 36px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--white); color: var(--ink);
  font: 500 13px var(--font-body); appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B5460' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding-right: 30px;
}
.cat-no-result { padding: 32px 16px; text-align: center; font: 500 14px var(--font-body); color: var(--ink-mid); }

/* ---------- Empty state ---------- */
.empty { padding: 48px 32px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.empty svg { width: 48px; height: 48px; color: var(--ink-light); opacity: 0.5; }
.empty p { font: 500 15px var(--font-body); color: var(--ink-mid); }

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.pd-main { padding: 0; }

/* Gallery — mobile */
.pg-mobile { position: relative; margin: 4px 16px 0; border-radius: 14px; overflow: hidden; aspect-ratio: 3/4; background: var(--img-bg); }
.pg-main-m { position: absolute; inset: 0; }
.pg-main-m img.pg-fg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-thumbs-overlay { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.pg-thumb-sm {
  width: 44px; height: 58px; border-radius: 8px; overflow: hidden; cursor: pointer; flex: none;
  border: 1px solid rgba(255,255,255,0.75); box-sizing: border-box; box-shadow: 0 1px 4px rgba(28,20,24,0.2);
}
.pg-thumb-sm.active { border: 2px solid var(--pink-deep); }
.pg-thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.pg-nav { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; z-index: 5; }
.pg-nav button {
  width: 36px; height: 36px; border-radius: 50%; border: none; background: #fff;
  box-shadow: 0 2px 8px rgba(28,20,24,0.22); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.pg-nav svg { width: 16px; height: 16px; color: var(--ink); }
.pg-placeholder { position: absolute; inset: 0; background: var(--img-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; }
.pg-placeholder svg { width: 28px; height: 28px; color: var(--pink); }
.pg-placeholder span { font: 400 12px/1.4 var(--font-body); color: var(--ink-mid); }

/* Gallery — desktop */
.pg-desktop { display: none; }

/* Info */
.pd-info { padding: 20px 16px 0; }
.pd-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pd-title { margin: 0; font: 700 24px/1.25 var(--font-display); color: var(--ink); }
.pd-price-block { margin-top: 14px; }
.pd-price-block .price-original { font-size: 13px; }
.pd-price-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.pd-price-row .price-sale { font-size: 30px; }
.pd-sold { font: 400 12px var(--font-body); color: var(--ink-mid); }
.pd-ship-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; font: 400 12px var(--font-body); color: var(--ink-mid); }
.pd-ship-note svg { width: 14px; height: 14px; }

.pd-block { margin-top: 20px; }
.pd-label { font: 500 14px var(--font-body); color: var(--ink); margin-bottom: 10px; }
.pd-label strong { font-weight: 600; }
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch-lg {
  width: 56px; height: 40px; border-radius: 999px; padding: 3px; cursor: pointer; flex: none;
  border: none; background: none; box-sizing: border-box;
}

.size-guide-link { font: 400 13px var(--font-body); color: var(--ink-mid); text-decoration: underline; cursor: pointer; background: none; border: none; }
.pd-size-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.size-row { display: flex; gap: 10px; flex-wrap: wrap; }
.size-pill {
  min-width: 76px; height: 56px; border-radius: 20px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; box-sizing: border-box; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--ink);
}
.size-pill .sp-label { font: 600 15px var(--font-body); }
.size-pill .sp-sub { font: 400 10px var(--font-body); opacity: 0.85; }
.size-pill.selected { border: 2px solid var(--pink-deep); background: var(--pink); color: #fff; }
.size-pill.is-disabled {
  position: relative; border: 1px solid var(--border); background: #F4F1EF; color: var(--ink-light); opacity: 0.65; cursor: not-allowed;
}
.size-pill.is-disabled .sp-label { text-decoration: line-through; }
.size-pill.is-disabled::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, transparent calc(50% - 0.5px), var(--ink-light) calc(50% - 0.5px), var(--ink-light) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.size-pill.has-error { border: 2px solid var(--pink-deep); }
.pd-size-error { margin-top: 8px; font: 400 12px var(--font-body); color: var(--pink-deep); }
.shake { animation: sizeShake 0.5s var(--ease-standard); }
@keyframes sizeShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* CTA row (qty stepper + 2 buttons) */
.cta-row { display: flex; align-items: center; gap: 10px; }
.qty-stepper { display: flex; align-items: center; background: #F4F1EF; border-radius: var(--radius-pill); height: 44px; flex: none; }
.qty-stepper button { width: 34px; height: 44px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.qty-stepper button svg { width: 14px; height: 14px; }
.qty-stepper .qty-val { width: 24px; text-align: center; font: 600 14px var(--font-body); color: var(--ink); }
.cta-row .btn { flex: 1; }

.pd-cta-desktop { display: none; }
.pd-trust { margin-top: 20px; }
.pd-trust-list { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.trust-line { display: flex; align-items: center; gap: 10px; }
.trust-line svg { width: 18px; height: 18px; color: var(--pink); flex: none; }
.trust-line span { font: 400 13px var(--font-body); color: var(--ink-mid); }
.pd-desc-link { margin-top: 18px; }
.pd-desc-link span { font: 400 13px var(--font-body); color: var(--ink-mid); text-decoration: underline; cursor: pointer; }

/* Sticky CTA (mobile) */
.pd-cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--white); box-shadow: 0 -4px 16px rgba(28,20,24,0.1); padding: 12px 16px;
}
.pd-cta-bar .cta-row { }
.pd-cta-bar .btn { height: 48px; }
.pd-cta-bar .qty-stepper { height: 44px; }
.pd-spacer { height: 96px; }

/* Description */
.pd-desc { padding: 8px 16px 16px; }
.pd-desc-heading { font: 700 15px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.benefit-icons { display: flex; justify-content: space-between; margin-bottom: 20px; }
.benefit-icons .bi { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.bi-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--pink-light); display: flex; align-items: center; justify-content: center; }
.bi-circle svg { width: 18px; height: 18px; color: var(--pink); }
.benefit-icons .bi span { font: 400 11px var(--font-body); color: var(--ink-mid); text-align: center; }
.pd-headline { font: 700 18px/1.4 var(--font-display); color: var(--ink); margin: 0 0 20px; }
.pd-video { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; margin-bottom: 20px; background: var(--img-bg); }
.pd-video-play { position: absolute; inset: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; cursor: pointer; background: none; }
.pd-video-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-video-play::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.pd-video-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1; }
.pd-video-icon svg { width: 52px; height: 52px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.pd-video iframe { width: 100%; height: 100%; border: none; display: block; }
.pd-lifestyle-img { width: 100%; border-radius: 14px; display: block; margin-bottom: 20px; }
.spec-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.spec-table .st-row { display: flex; }
.spec-table .st-row + .st-row { border-top: 1px solid var(--border); }
.spec-table .st-label { flex: 0 0 40%; padding: 10px 12px; font: 600 12px var(--font-body); color: var(--ink-mid); background: #FAF8F7; }
.spec-table .st-value { flex: 1; padding: 10px 12px; font: 400 13px var(--font-body); color: var(--ink); }
.model-info { font: 400 12px var(--font-body); font-style: italic; color: var(--ink-light); }
.pd-faq { margin-top: 24px; }
.pd-faq-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.pd-faq-item summary { font: 600 14px var(--font-body); color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pd-faq-item summary::-webkit-details-marker { display: none; }
.pd-faq-item summary::after { content: '+'; font: 400 18px var(--font-body); color: var(--ink-mid); flex: none; }
.pd-faq-item[open] summary::after { content: '\2212'; }
.pd-faq-item p { margin: 10px 0 0; font: 400 13px/1.6 var(--font-body); color: var(--ink-mid); }

/* Related */
.pd-related { padding: 8px 0 24px; }
.pd-related .pd-desc-heading { margin: 0 16px 14px; }
.related-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
.related-scroll::-webkit-scrollbar { display: none; }
.related-card { flex: none; width: 140px; color: inherit; }
.related-card .rc-img { position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--img-bg); }
.related-card .rc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.related-card .rc-quickadd {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: none;
  background: #fff; box-shadow: 0 2px 6px rgba(28,20,24,0.22); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.related-card .rc-quickadd svg { width: 13px; height: 13px; color: var(--ink); }
.related-card .rc-name {
  font: 400 13px/1.4 var(--font-body); color: var(--ink); margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px;
}
.related-card .price-sale { font-size: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 12px; right: 12px; bottom: 86px; z-index: 80;
  background: var(--white); border-radius: 14px; box-shadow: var(--shadow-md); padding: 12px;
  display: flex; align-items: center; gap: 12px;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity var(--duration-standard) var(--ease-standard), transform var(--duration-standard) var(--ease-standard);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-thumb { width: 44px; height: 58px; border-radius: 8px; overflow: hidden; flex: none; background: var(--img-bg); }
.toast-thumb img { width: 100%; height: 100%; object-fit: cover; }
.toast-body { flex: 1; min-width: 0; }
.toast-body .tb-title { font: 600 13px var(--font-body); color: var(--ink); display: flex; align-items: center; gap: 5px; }
.toast-body .tb-title svg { width: 13px; height: 13px; color: var(--pink); }
.toast-body .tb-name { font: 400 12px var(--font-body); color: var(--ink-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-action { font: 600 12px var(--font-body); color: var(--pink-deep); white-space: nowrap; cursor: pointer; flex: none; }

/* ---------- Bottom sheet (size guide / quick-add / variant) ---------- */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(28,20,24,0.45);
  display: flex; align-items: flex-end; opacity: 0; visibility: hidden;
  transition: opacity var(--duration-standard) var(--ease-standard), visibility var(--duration-standard);
}
.sheet-overlay.open { opacity: 1; visibility: visible; }
.sheet-panel {
  width: 100%; background: var(--white); border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-md); padding: 20px 16px 24px;
  transform: translateY(100%); transition: transform var(--duration-standard) var(--ease-standard);
}
.sheet-overlay.open .sheet-panel { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-title { font: 700 16px var(--font-display); color: var(--ink); }
.sheet-close { width: 28px; height: 28px; border: none; background: #F4F1EF; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sheet-close svg { width: 14px; height: 14px; }
.sheet-panel .btn { margin-top: 16px; }
.sheet-size-row { display: flex; gap: 10px; }
.sheet-size-row .size-pill { flex: 1; height: 48px; min-width: 0; }

/* Size guide table (shared) */
.sg-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.sg-table .sg-row { display: flex; font: 400 12px var(--font-body); color: var(--ink); }
.sg-table .sg-row.head { background: #FAF8F7; font: 600 12px var(--font-body); color: var(--ink-mid); }
.sg-table .sg-row + .sg-row { border-top: 1px solid var(--border); }
.sg-table .sg-row > span { flex: 1; padding: 10px 6px; text-align: center; }
.sg-table .sg-row > span:first-child { flex: 0 0 15%; font-weight: 600; text-align: left; padding-left: 10px; }
.sg-table .sg-row.head > span:first-child { font-weight: 600; }

/* ---------- Floating buttons ---------- */
.fab-top { position: fixed; left: 16px; bottom: 20px; z-index: 35; }
.fab-zalo {
  position: fixed; right: 16px; bottom: 20px; z-index: 35; width: 44px; height: 44px; border-radius: 50%;
  background: #0068FF; border: none; box-shadow: 0 4px 12px rgba(0,104,255,0.4);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.fab-zalo svg { width: 19px; height: 19px; color: #fff; }
.pd-fab-offset .fab-top, .pd-fab-offset .fab-zalo { bottom: 96px; }

/* ============================================================
   CART / CHECKOUT (/gio-hang/)
   ============================================================ */
.cart-title-row { padding: 18px 16px 0; display: flex; align-items: baseline; gap: 8px; }
.cart-title-row h1 { margin: 0; font: 700 24px/1.25 var(--font-display); color: var(--ink); }
.cart-title-row .count { font: 400 12px var(--font-body); color: var(--ink-mid); }

.prefill-banner {
  margin: 14px 16px 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--pink-light); border-radius: 10px;
}
.prefill-banner svg { width: 15px; height: 15px; color: var(--pink); flex: none; }
.prefill-banner span { font: 400 12px/1.4 var(--font-body); color: var(--ink); }

.cart-lines { padding: 16px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.cart-line { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; gap: 12px; }
.cart-line-thumb { width: 72px; height: 96px; border-radius: 10px; overflow: hidden; flex: none; background: var(--img-bg); }
.cart-line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cart-line-top { display: flex; gap: 8px; }
.cart-line-name { flex: 1; min-width: 0; font: 500 14px/1.35 var(--font-body); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-line-remove { flex: none; width: 28px; height: 28px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cart-line-remove svg { width: 16px; height: 16px; color: var(--ink-light); }
.variant-pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: #fff;
  font: 500 12px var(--font-body); color: var(--ink); cursor: pointer;
}
.cart-line-bottom { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.qty-stepper-sm { display: flex; align-items: center; background: #F4F1EF; border-radius: var(--radius-pill); height: 32px; flex: none; }
.qty-stepper-sm button { width: 26px; height: 32px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.qty-stepper-sm button svg { width: 12px; height: 12px; }
.qty-stepper-sm .qty-val { width: 20px; text-align: center; font: 600 13px var(--font-body); color: var(--ink); }
.cart-line-price { text-align: right; flex: 1; }
.cart-line-price .price-sale { font-size: 15px; }
.cart-line-price .price-original { display: block; font-size: 12px; }
.cart-line-disabled { opacity: 0.6; }
.cart-line-disabled-note { font: 400 11px var(--font-body); color: var(--pink-deep); }

.form-section { margin: 24px 16px 0; }
.form-heading { font: 700 15px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font: 500 14px var(--font-body); color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font: 400 15px/1.5 var(--font-body); padding: 11px 14px;
  border-radius: var(--radius-button); border: 1px solid var(--border); outline: none; color: var(--ink);
  background: var(--white); width: 100%;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px; }
.field select:invalid { color: var(--ink-light); }
.field textarea { resize: vertical; }
.field-select-wrap { position: relative; }
.field-select-wrap svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; width: 16px; height: 16px; color: var(--ink-mid); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--border-error); }
.field-error-msg { font: 400 12px var(--font-body); color: var(--state-error); }
.honeypot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cod-box { margin: 20px 16px 0; background: var(--pink-light); border-radius: 14px; padding: 14px; display: flex; gap: 10px; }
.cod-box svg { width: 20px; height: 20px; color: var(--pink); flex: none; margin-top: 1px; }
.cod-box span { font: 400 13px/1.5 var(--font-body); color: var(--ink); }
.cod-box strong { font-weight: 600; }

.pay-summary { margin: 20px 16px 0; }
.pay-summary-rows { display: flex; flex-direction: column; gap: 10px; font: 400 13px var(--font-body); color: var(--ink); }
.pay-summary-rows .row { display: flex; justify-content: space-between; }
.pay-summary-rows .row.discount span:last-child { color: var(--pink); }
.pay-summary-rows .row.ship span:last-child { color: var(--pink); }
.pay-summary-rows .row.total { border-top: 1px solid var(--border); margin-top: 2px; padding-top: 12px; align-items: center; }
.pay-summary-rows .row.total span:first-child { font: 600 14px var(--font-body); color: var(--ink); }
.pay-summary-rows .row.total span:last-child { font: 700 20px var(--font-body); color: var(--ink); }

.order-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--white);
  box-shadow: 0 -4px 16px rgba(28,20,24,0.1); padding: 12px 16px; display: flex; align-items: center; gap: 12px;
}
.order-bar-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--pink-light); display: flex; align-items: center; justify-content: center; flex: none; }
.order-bar-icon svg { width: 18px; height: 18px; color: var(--pink); }
.order-bar-text { flex: 1; min-width: 0; }
.order-bar-total { font: 700 16px var(--font-body); color: var(--ink); }
.order-bar-save { font: 600 12px var(--font-body); color: var(--pink); }
.order-bar-submit {
  height: 48px; padding: 0 20px; border-radius: var(--radius-button); border: none;
  background: var(--pink); color: #fff; font: 600 15px/1 var(--font-body);
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; min-width: 128px; flex: none;
}
.order-bar-submit:disabled { opacity: 0.85; cursor: not-allowed; }
.spinner {
  width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  animation: xv-spin 0.7s linear infinite; display: inline-block;
}
@keyframes xv-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.cart-spacer { height: 96px; }

.cart-empty { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 32px; }
.cart-empty svg { width: 52px; height: 52px; color: var(--ink-light); opacity: 0.5; }
.cart-empty h2 { font: 700 18px var(--font-display); color: var(--ink); }
.cart-empty p { font: 400 13px/1.5 var(--font-body); color: var(--ink-mid); max-width: 240px; }

/* ============================================================
   SUCCESS PAGE (/dat-hang-thanh-cong/)
   ============================================================ */
.success-shell { min-height: 100vh; display: flex; flex-direction: column; }
.success-header { display: flex; align-items: center; justify-content: center; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--white); }
.success-header img { height: 36px; width: auto; }
.success-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 28px 24px 24px; text-align: center; gap: 12px; }
.success-icon { width: 68px; height: 68px; border-radius: 50%; background: var(--pink-light); border: 2px solid var(--pink); display: flex; align-items: center; justify-content: center; }
.success-icon svg { width: 34px; height: 34px; color: var(--pink); }
.success-title { font: 700 22px var(--font-display); color: var(--ink); }
.order-code-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--pink-light); border-radius: var(--radius-pill); padding: 7px 8px 7px 14px; }
.order-code-pill .label { font: 400 12px var(--font-body); color: var(--ink-mid); }
.order-code-pill .code { font: 700 13px var(--font-body); color: var(--pink-deep); letter-spacing: .02em; }
.copy-btn { display: flex; align-items: center; gap: 4px; border: none; background: transparent; color: var(--ink-mid); font: 600 11px var(--font-body); cursor: pointer; padding: 0; }
.copy-btn.copied { color: var(--pink-deep); }
.copy-btn svg { width: 12px; height: 12px; }
.success-note { font: 400 13px/1.6 var(--font-body); color: var(--ink-mid); max-width: 270px; }
.order-summary-card { width: 100%; margin-top: 10px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 14px; text-align: left; }
.order-summary-item { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.order-summary-thumb { width: 40px; height: 52px; border-radius: 8px; overflow: hidden; flex: none; background: var(--img-bg); }
.order-summary-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-summary-info { flex: 1; min-width: 0; }
.order-summary-info .osi-name { font: 500 13px/1.3 var(--font-body); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-summary-info .osi-variant { font: 400 11px var(--font-body); color: var(--ink-light); }
.order-summary-price { font: 600 13px var(--font-body); color: var(--ink); flex: none; }
.order-summary-total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; }
.order-summary-total span:first-child { font: 600 13px var(--font-body); color: var(--ink); }
.order-summary-total span:last-child { font: 700 17px var(--font-body); color: var(--ink); }
.success-actions { display: flex; gap: 10px; margin-top: 14px; width: 100%; }
.success-actions .btn { flex: 1; }
.success-footer { padding: 14px 16px; background: var(--ink); font: 400 11px var(--font-body); color: rgba(255,255,255,0.5); text-align: center; }
.success-noorder .order-code-pill, .success-noorder .order-summary-card { display: none; }

/* ============================================================
   404
   ============================================================ */
.nf-hero { position: relative; padding: 44px 24px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; overflow: hidden; }
.nf-watermark { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); height: 200px; opacity: 0.06; filter: blur(1px); pointer-events: none; }
.nf-code { position: relative; font: 700 96px/1 var(--font-display); color: var(--pink-light); }
.nf-title { position: relative; font: 700 17px var(--font-body); color: var(--ink); }
.nf-sub { position: relative; font: 400 13px/1.5 var(--font-body); color: var(--ink-mid); max-width: 260px; }
.nf-cta { position: relative; margin-top: 6px; }
.nf-suggest { padding: 36px 16px 0; }
.nf-suggest-heading { font: 700 13px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.nf-suggest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ============================================================
   CONTENT PAGE (chính sách / giới thiệu / liên hệ)
   ============================================================ */
.content-page { padding: 14px 16px 0; }
.content-page h1 { margin: 14px 0 16px; font: 700 26px/1.25 var(--font-display); color: var(--ink); }
.content-page .intro { font: 400 15px/1.8 var(--font-body); color: var(--ink); margin-bottom: 24px; }
.content-subhead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.content-subhead .bar { width: 3px; height: 16px; background: var(--pink); border-radius: 2px; flex: none; }
.content-subhead span { font: 700 15px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.content-bullets { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.content-bullets .bullet { display: flex; align-items: flex-start; gap: 10px; }
.content-bullets .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); flex: none; margin-top: 8px; }
.content-bullets span:last-child { font: 400 14px/1.6 var(--font-body); color: var(--ink); }
.content-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 22px; }
.content-table .ct-head { display: grid; grid-template-columns: 1.1fr 1.4fr; background: var(--pink-light); }
.content-table .ct-head span { padding: 10px 12px; font: 600 12px var(--font-body); color: var(--ink); }
.content-table .ct-row { display: grid; grid-template-columns: 1.1fr 1.4fr; border-top: 1px solid var(--border); }
.content-table .ct-row span { padding: 10px 12px; font: 400 12px/1.5 var(--font-body); }
.content-table .ct-row span:first-child { color: var(--ink); }
.content-table .ct-row span:last-child { color: var(--ink-mid); border-left: 1px solid var(--border); }
.content-info-box { margin-bottom: 22px; background: var(--pink-light); border-radius: 14px; padding: 14px; display: flex; gap: 10px; }
.content-info-box svg { width: 18px; height: 18px; color: var(--pink); flex: none; margin-top: 1px; }
.content-info-box span { font: 400 13px/1.55 var(--font-body); color: var(--ink); }
.contact-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.contact-btns .btn { flex: 1 1 auto; min-width: 150px; }

/* ============================================================
   DESKTOP (>= 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .hide-desktop { display: none !important; }
  .hide-mobile { display: block; }

  /* Header */
  .header-inner { max-width: 1200px; margin: 0 auto; height: 72px; padding: 0 40px; display: grid; grid-template-columns: 1fr auto 1fr; }
  .header-logo-link { grid-column: 1; justify-self: start; gap: 4px; }
  .header-logo-icon { height: 34px; }
  .header-logo-text { font-size: 13px; }
  .header-nav { grid-column: 2; justify-self: center; display: flex; gap: 36px; }
  .header-actions { grid-column: 3; justify-self: end; gap: 6px; }
  .header-nav a { font: 400 14px var(--font-body); color: var(--ink-mid); cursor: pointer; transition: color 160ms var(--ease-standard); }
  .header-nav a:hover { color: var(--ink); }
  .header-nav a.active { font-weight: 600; color: var(--pink); }
  .header-actions .icon-btn { width: 40px; height: 40px; }
  .search-panel-inner { max-width: 1200px; margin: 0 auto; padding: 16px 40px; }
  .search-input-row { max-width: 480px; }
  .search-results { max-height: 420px; }

  /* Hero */
  .hero-mobile { display: none; }
  .hero-desktop {
    display: block; position: relative; padding: 56px 40px; overflow: hidden;
    background: linear-gradient(135deg, var(--pink-light), var(--cream), var(--pink-light));
  }
  .hero-desktop-glow { position: absolute; top: -100px; right: 120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(232,82,122,0.16), rgba(232,82,122,0) 70%); pointer-events: none; }
  .hero-desktop-inner { position: relative; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; min-height: 320px; }
  .hero-desktop-text { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-desktop-text .hero-eyebrow { color: var(--pink); font-size: 13px; }
  .hero-desktop-text .hero-title { font-size: 44px; color: var(--ink); max-width: 460px; }
  .hero-desktop-text .hero-title em { color: var(--pink); }
  .hero-desktop-text .hero-sub { font-size: 16px; max-width: 420px; color: var(--ink-mid); }
  .hero-desktop-text .hero-cta { margin-top: 8px; }
  .hero-desktop-img { border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; background: var(--img-bg); box-shadow: var(--shadow-md); }
  .hero-desktop-img img { width: 100%; height: 100%; object-fit: cover; }

  /* Category circle strip */
  .cat-circle-strip { max-width: 1200px; margin: 0 auto; padding: 24px 40px 0; overflow: visible; justify-content: center; }

  /* Tiles */
  .tile-grid { max-width: 1200px; margin: 0 auto; padding: 32px 40px 0; grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .tile { aspect-ratio: 4/3; }
  .tile .tile-label { font-size: 17px; }

  /* Section + grid */
  .section { max-width: 1200px; margin: 0 auto; padding: 32px 40px 8px; }
  .section-title { font-size: 26px; }
  .product-grid { max-width: 1200px; margin: 0 auto; padding: 0 40px; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
  .pcard:hover .pcard-img img { transform: scale(1.03); box-shadow: var(--shadow-card-hover); }
  .pcard:hover .pcard-img-hover { opacity: 1; }
  .pcard-quickadd { opacity: 0.88; }
  .pcard:hover .pcard-quickadd { opacity: 1; box-shadow: 0 4px 12px rgba(28,20,24,0.28); }

  /* Trust */
  .trust-scroll { max-width: 1200px; margin: 0 auto; padding: 32px 40px 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; overflow: visible; }
  .trust-scroll .trust-card { width: auto; margin: 0; padding: 18px; gap: 14px; flex-direction: row; align-items: center; }
  .trust-scroll .trust-card svg { width: 22px; height: 22px; flex: none; }
  .trust-scroll .trust-card span { font-size: 14px; }

  /* Brand story */
  .brand-story { padding: 56px 0; margin-top: 32px; }
  .brand-story-inner { max-width: 1200px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .brand-story-img { margin-bottom: 0; aspect-ratio: 4/3; }
  .brand-story h2 { font: 700 26px var(--font-display); color: var(--ink); margin-bottom: 16px; }
  .brand-story p { font-size: 15px; max-width: 440px; }

  /* Footer */
  .footer { padding: 48px 0 24px; margin-top: 32px; text-align: left; }
  .footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
  .footer-brand-col { align-items: flex-start; }
  .footer-logo-lockup { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 18px; }
  .footer-brand-col .footer-logo { height: 38px; }
  .footer-logo-text { font-size: 19px; }
  .footer-brand-col p { font: 400 14px/1.75 var(--font-body); color: rgba(255,255,255,0.72); max-width: 320px; margin: 0; }
  .footer-col-title { font: 700 14px var(--font-body); color: rgba(255,255,255,0.55); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
  .footer-links { margin-bottom: 0; align-items: flex-start; }
  .footer-contact { margin: 0; max-width: none; font: 400 14px/1.85 var(--font-body); }
  .footer-copy { max-width: 1200px; margin: 28px auto 0; padding: 16px 40px 0; text-align: left; }

  /* Category page */
  .breadcrumb { max-width: 1200px; margin: 0 auto; padding: 10px 40px 0; }
  .cat-header { max-width: 1200px; margin: 0 auto; padding: 10px 40px 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
  .cat-header h1 { font-size: 30px; }
  .cat-header .count { font-size: 13px; }
  .chip-row { max-width: 1200px; margin: 0 auto; padding: 0 40px 24px; flex: none; }
  .cat-toolbar { max-width: 1200px; margin: 0 auto; padding: 0 40px 24px; flex: none; justify-content: flex-end; }
  .cat-select { flex: none; width: 168px; }

  /* ---- Product detail desktop ---- */
  .breadcrumb.pd-breadcrumb { padding: 10px 40px; }
  .pd-main-inner { max-width: 1200px; margin: 0 auto; padding: 28px 40px 0; display: grid; grid-template-columns: 1.45fr 1fr; gap: 56px; align-items: flex-start; }

  .pg-mobile { display: none; }
  .pg-desktop { display: flex; gap: 14px; }
  .pg-thumbs { display: flex; flex-direction: column; gap: 10px; flex: none; }
  .pg-thumb { width: 64px; height: 85px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 1px solid var(--border); box-sizing: border-box; }
  .pg-thumb.active { border: 2px solid var(--pink-deep); }
  .pg-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .pg-main-wrap { position: relative; flex: 1; border-radius: 14px; overflow: hidden; aspect-ratio: 3/4; background: var(--img-bg); }
  .pg-main-d { position: absolute; inset: 0; }
  .pg-main-d img.pg-fg { width: 100%; height: 100%; object-fit: cover; display: block; }
  .pg-main-wrap .pg-nav { right: 14px; bottom: 14px; }

  .pd-info { padding: 0; padding-bottom: 8px; }
  .pd-title { font: 700 28px/1.25 var(--font-display); }
  .pd-price-row .price-sale { font-size: 40px; }
  .pd-block { margin-top: 24px; }
  .swatch-lg { width: 64px; height: 44px; }
  .size-pill { min-width: 84px; height: 58px; }
  .cta-row .qty-stepper { height: 48px; }
  .cta-row .qty-stepper button { height: 48px; width: 36px; }
  .cta-row .btn { height: 48px; }
  .trust-grid { margin-top: 20px; }

  /* CTA bar hidden desktop (CTA in-flow) */
  .pd-cta-bar { display: none; }
  .pd-spacer { display: none; }
  .pd-cta-desktop { display: block; margin-top: 28px; }

  /* Description */
  .pd-desc { max-width: 1000px; margin: 56px auto 0; padding: 0 40px 8px; }
  .pd-desc-heading { font-size: 18px; text-align: left; }
  .benefit-icons { justify-content: center; gap: 64px; margin-bottom: 32px; }
  .bi-circle { width: 52px; height: 52px; }
  .bi-circle svg { width: 22px; height: 22px; }
  .benefit-icons .bi span { font-size: 13px; }
  .pd-headline { font-size: 20px; }
  .pd-video, .pd-lifestyle-img { margin-bottom: 28px; }

  .pd-related { max-width: 1000px; margin: 48px auto 0; padding: 0 40px 8px; }
  .related-scroll { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; overflow: visible; padding: 0; }
  .related-card { width: auto; }
  .related-card:hover .rc-img img { transform: scale(1.03); box-shadow: var(--shadow-card-hover); }
  .related-card .rc-name { font-size: 13px; min-height: 36px; }

  .pd-fab-offset .fab-top, .pd-fab-offset .fab-zalo { bottom: 20px; }

  /* Sheet -> centered dialog */
  .sheet-overlay { align-items: center; justify-content: center; }
  .sheet-panel { width: 400px; border-radius: var(--radius-card); padding: 24px; transform: scale(0.96); }
  .sheet-overlay.open .sheet-panel { transform: scale(1); }

  /* Cart drawer -> slide from right */
  .cartdrawer {
    left: auto; top: 0; bottom: 0; right: 0; width: 400px; max-width: 90vw; height: 100vh;
    max-height: none; border-radius: 0; transform: translateX(100%);
  }
  body.cartdrawer-open .cartdrawer { transform: translateX(0); }

  .toast { left: auto; right: 20px; bottom: 20px; max-width: 320px; }

  /* Cart page desktop: giãn nội dung, căn giữa */
  .cart-title-row, .prefill-banner, .cart-lines, .form-section, .cod-box, .pay-summary { max-width: 640px; margin-left: auto; margin-right: auto; }
  .cart-title-row { padding-top: 24px; }
  .order-bar { padding: 16px 40px; }
  .order-bar-icon, .order-bar-text, .order-bar-submit { max-width: 640px; }

  /* Success / 404 / content: giãn, căn giữa max-width ~720px */
  .success-body { max-width: 480px; margin: 0 auto; }
  .nf-suggest, .content-page { max-width: 720px; margin: 0 auto; }
  .nf-suggest-grid { grid-template-columns: repeat(2, 1fr); }
}
