/* ==========================================================================
   GOLDEN PHARMA — main.css
   Công Ty Cổ Phần Quốc Tế Thú Y Vàng — Website Thương Mại Điện Tử Dược Thú Y
   Ưu tiên số 1: Giao diện cao cấp, ảnh sản phẩm chính tách nền bo tròn góc
   như sample-product.png, chuyển động 60fps mượt trên cả điện thoại & máy tính.
   ========================================================================== */
@import url('fonts.css');
@import url('lenis.css');

:root {
  /* — Bảng màu thương hiệu Golden Pharma — */
  --ivory: #F5F4EE;
  --paper: #EAE8DF;
  --surface: #FFFFFF;
  --sage-soft: #E9EFEA;
  --forest-deep: #072014;
  --forest: #0B3320;
  --emerald: #0E6B3A;
  --emerald-light: #168A4C;
  --gold: #D49B16;
  --gold-bright: #F0B929;
  --gold-pale: #FBF3DC;
  --ink: #0E1F16;
  --ink-soft: #4A5D52;
  --ink-muted: #76887D;
  --line: rgba(14, 31, 22, 0.09);
  --line-dark: rgba(255, 255, 255, 0.12);
  --danger: #C92A2A;

  /* — Font chữ (tự host subset tiếng Việt đầy đủ) — */
  --f-display: 'Prata', Georgia, serif;
  --f-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* — Kích thước & Bo góc chuẩn sample-product.png — */
  --m: clamp(16px, 3vw, 44px);
  --max-w: 1360px;
  --header-h: 76px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* — Bóng đổ có chiều sâu — */
  --sh-card: 0 10px 30px -10px rgba(7, 32, 20, 0.08), 0 2px 6px -1px rgba(7, 32, 20, 0.04);
  --sh-hover: 0 22px 44px -12px rgba(7, 32, 20, 0.16), 0 4px 12px -2px rgba(7, 32, 20, 0.06);
  --sh-float: 0 28px 60px -15px rgba(5, 24, 14, 0.35);

  /* — Motion tokens (60fps GPU compositor) — */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --d-fast: 0.22s;
  --d-med: 0.48s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 16px/1.6 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
::selection { background: var(--emerald); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- Containers & Grid ----- */
.wrap {
  width: 100%;
  max-width: calc(var(--max-w) + var(--m) * 2);
  margin-inline: auto;
  padding-inline: var(--m);
}
.sec { padding-block: clamp(56px, 8vw, 108px); position: relative; }
.sec--white { background: var(--surface); }
.sec--sage { background: var(--sage-soft); }
.sec--dark {
  background: radial-gradient(110% 90% at 75% 20%, #134E31 0%, var(--forest) 52%, var(--forest-deep) 100%);
  color: #F6F5F0;
}

/* ----- Typography ----- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
  background: rgba(14, 107, 58, 0.09);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
}
.sec--dark .eyebrow {
  color: var(--gold-bright);
  background: rgba(240, 185, 41, 0.14);
  border: 1px solid rgba(240, 185, 41, 0.25);
}
.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(26px, 3.1vw, 42px);
  line-height: 1.16;
}
.h3 {
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  line-height: 1.3;
}
.lead {
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}
.sec--dark .lead { color: rgba(246, 245, 240, 0.8); }

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform var(--d-fast) var(--ease-out), box-shadow var(--d-fast) var(--ease-out), background var(--d-fast);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: linear-gradient(135deg, var(--emerald-light) 0%, var(--emerald) 100%);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(14, 107, 58, 0.45);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -6px rgba(14, 107, 58, 0.55);
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
  color: var(--forest-deep);
  box-shadow: 0 8px 22px -6px rgba(212, 155, 22, 0.45);
}
.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(212, 155, 41, 0.6);
}
.btn--outline {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--outline:hover {
  border-color: var(--emerald);
  color: var(--emerald);
  transform: translateY(-2px);
}
.btn--ghost-light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}
.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}
.btn--sm { height: 40px; padding: 0 16px; font-size: 13px; }
.btn--full { width: 100%; }

/* ==========================================================================
   Intro Screen & Page Curtain
   ========================================================================== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--forest-deep);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: clip-path 0.75s var(--ease-in-out);
}
.intro__logo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(240, 185, 41, 0.35);
  display: grid;
  place-items: center;
  padding: 14px;
}
.intro__word {
  font-family: var(--f-display);
  font-size: clamp(24px, 4vw, 44px);
  letter-spacing: 0.18em;
  color: var(--gold-bright);
}
.intro__sub {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.topbar {
  background: var(--forest-deep);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__left, .topbar__right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.topbar a:hover { color: var(--gold-bright); }
.topbar__badge {
  background: rgba(240, 185, 41, 0.18);
  color: var(--gold-bright);
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 11px;
}
@media (max-width: 768px) {
  .topbar__right { display: none; }
  .topbar__left { justify-content: center; width: 100%; gap: 10px; font-size: 11.5px; }
}

.header {
  position: sticky;
  top: 0;
  z-index: 120;
  height: var(--header-h);
  background: rgba(245, 244, 238, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background var(--d-fast), box-shadow var(--d-fast);
}
.header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 28px -12px rgba(7, 32, 20, 0.12);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 5px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(14, 107, 58, 0.1);
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.brand__txt { display: flex; flex-direction: column; }
.brand__name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--emerald);
  line-height: 1.15;
}
.brand__sub {
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 34px);
}
.nav__link {
  position: relative;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 0;
  transition: color var(--d-fast);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.32s var(--ease-out);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--emerald); font-weight: 600; }
.nav__link:hover::after, .nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--paper);
  padding: 3px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
}
.lang-switch button {
  padding: 5px 10px;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  transition: background var(--d-fast), color var(--d-fast);
}
.lang-switch button.is-active {
  background: var(--surface);
  color: var(--emerald);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cart-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--forest);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  transition: transform var(--d-fast) var(--ease-out), background var(--d-fast);
}
.cart-trigger:hover { background: var(--emerald); transform: translateY(-1px); }
.cart-trigger svg { width: 18px; height: 18px; }
.cart-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--gold-bright);
  color: var(--forest-deep);
  font-size: 12px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  place-items: center;
}
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .header { --header-h: 66px; }
  .cart-trigger__lbl { display: none; }
  .cart-trigger { padding: 0 12px; }
}

/* Mobile Menu Drawer */
.m-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}
.m-drawer.is-open { pointer-events: auto; visibility: visible; }
.m-drawer__bg {
  position: absolute;
  inset: 0;
  background: rgba(7, 32, 20, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.32s var(--ease-out);
}
.m-drawer.is-open .m-drawer__bg { opacity: 1; }
.m-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 88vw);
  background: var(--surface);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(102%);
  transition: transform 0.38s var(--ease-out);
  overflow-y: auto;
}
.m-drawer.is-open .m-drawer__panel { transform: translateX(0); }
.m-drawer__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 20px;
}
.m-drawer__links a {
  padding: 13px 14px;
  border-radius: var(--r-sm);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m-drawer__links a:hover, .m-drawer__links a[aria-current="page"] {
  background: var(--sage-soft);
  color: var(--emerald);
}

/* ==========================================================================
   1. HERO — Sân Khấu Sản Phẩm 3D Nổi & Chuyển Nhanh
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(65% 80% at 76% 42%, rgba(22, 138, 76, 0.34) 0%, rgba(11, 51, 32, 0) 70%),
    radial-gradient(50% 60% at 18% 85%, rgba(212, 155, 22, 0.16) 0%, transparent 70%),
    linear-gradient(145deg, #061A10 0%, #0B3320 55%, #072215 100%);
  color: #F6F5F0;
  padding-block: clamp(40px, 6vw, 84px) clamp(52px, 7vw, 96px);
}
.hero__bg-word {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  font-family: var(--f-display);
  font-size: clamp(72px, 15vw, 220px);
  color: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: 0.06em;
}
.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.hero__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 4.3vw, 58px);
  line-height: 1.1;
  margin-bottom: 18px;
}
.hero__title em {
  font-style: normal;
  color: var(--gold-bright);
}
.hero__desc {
  font-size: clamp(15.5px, 1.2vw, 18px);
  color: rgba(246, 245, 240, 0.82);
  max-width: 54ch;
  margin-bottom: 24px;
}

/* Thanh tìm kiếm thông minh ngay trên Hero */
.hero__search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--r-pill);
  padding: 6px 6px 6px 20px;
  max-width: 540px;
  margin-bottom: 20px;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.35);
}
.hero__search input {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 14.5px;
  outline: none;
}
.hero__search input::placeholder { color: var(--ink-muted); }
.hero__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  font-size: 12.5px;
}
.hero__tags span { color: rgba(255, 255, 255, 0.6); }
.hero__tag {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  transition: background var(--d-fast), border-color var(--d-fast);
}
.hero__tag:hover {
  background: rgba(240, 185, 41, 0.2);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

.hero__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.hero__metric b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(22px, 2.4vw, 32px);
  color: var(--gold-bright);
  line-height: 1.1;
}
.hero__metric small {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
}

/* Sân khấu sản phẩm 3D bên phải Hero */
.hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stage__card {
  position: relative;
  width: 100%;
  max-width: 490px;
  aspect-ratio: 1 / 1.02;
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.98) 0%, #F3F2EC 72%, #E5E9E4 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--sh-float);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(18px, 3vw, 28px);
  overflow: hidden;
  color: var(--ink);
}
.hero-stage__aura {
  position: absolute;
  width: 68%;
  height: 68%;
  left: 16%;
  top: 10%;
  border-radius: 50%;
  background: var(--stage-accent, #0E6B3A);
  opacity: 0.14;
  filter: blur(42px);
  pointer-events: none;
  transition: background 0.5s ease;
}
.hero-stage__top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hero-stage__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--forest);
  color: var(--gold-bright);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.hero-stage__sold {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--emerald);
  background: rgba(14, 107, 58, 0.1);
  padding: 5px 11px;
  border-radius: var(--r-pill);
}

.hero-stage__visual {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 8px 0;
}
.hero-stage__img {
  max-height: 270px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 24px rgba(7, 32, 20, 0.22));
  animation: heroFloat 4.2s ease-in-out infinite;
  will-change: transform;
}
@keyframes heroFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -10px, 0) rotate(-1.2deg); }
}

.hero-stage__foot {
  position: relative;
  z-index: 3;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(14, 31, 22, 0.08);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hero-stage__name {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-stage__price {
  font-size: 18px;
  font-weight: 800;
  color: var(--emerald);
  margin-top: 2px;
}
.hero-stage__price del {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-muted);
  margin-left: 6px;
}

/* Hàng thumbnail bo góc chọn sản phẩm trên Hero */
.hero-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.hero-thumb {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #fff;
  padding: 5px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: transform var(--d-fast) var(--ease-out), border-color var(--d-fast), box-shadow var(--d-fast);
  overflow: hidden;
}
.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero-thumb.is-active {
  border-color: var(--gold-bright);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero-stage__card { max-width: 440px; aspect-ratio: 1 / 0.96; }
  .hero-stage__img { max-height: 220px; }
}

/* ==========================================================================
   2. DANH MỤC THEO ĐỐI TƯỢNG & NHÓM BỆNH LÝ
   ========================================================================== */
.cat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.cat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--sh-card);
  transition: transform 0.32s var(--ease-out), box-shadow 0.32s var(--ease-out), border-color 0.25s;
  overflow: hidden;
}
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-hover);
  border-color: var(--emerald);
}
.cat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cat-card__thumb {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: var(--ivory);
  padding: 6px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}
.cat-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s var(--ease-out);
}
.cat-card:hover .cat-card__thumb img { transform: scale(1.08) rotate(-2deg); }
.cat-card__cnt {
  font-size: 12px;
  font-weight: 700;
  color: var(--emerald);
  background: rgba(14, 107, 58, 0.08);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.cat-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.cat-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.cat-card__more {
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 1120px) {
  .cat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .cat-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin-inline: calc(var(--m) * -1);
    padding-inline: var(--m);
  }
  .cat-card {
    min-width: 250px;
    scroll-snap-align: start;
  }
}

/* ==========================================================================
   3. SÂN KHẤU SẢN PHẨM BÁN CHẠY (3D Depth Showcase như Runway của Harmony)
   ========================================================================== */
.showcase {
  position: relative;
  overflow: hidden;
}
.showcase__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
}
.showcase__stage {
  position: relative;
  height: clamp(360px, 46vw, 520px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(60% 60% at 50% 48%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.02) 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1000px;
}
.showcase__glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: var(--spot-accent, #E05314);
  opacity: 0.32;
  filter: blur(64px);
  transition: background 0.5s ease;
  pointer-events: none;
}
.showcase__pedestal {
  position: absolute;
  bottom: 34px;
  width: 58%;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}
.showcase__lineup {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.spot-item {
  position: absolute;
  width: min(310px, 68%);
  height: 78%;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  transition: transform 0.55s var(--ease-out), opacity 0.55s var(--ease-out), filter 0.55s var(--ease-out);
  cursor: pointer;
  will-change: transform, opacity;
}
.spot-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.spot-item.is-active {
  z-index: 10;
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  filter: none;
  border: 2px solid var(--gold-bright);
}
.spot-item.is-prev {
  z-index: 6;
  transform: translate3d(-44%, -4%, -80px) scale(0.76) rotate(-4deg);
  opacity: 0.55;
  filter: blur(1px);
}
.spot-item.is-next {
  z-index: 6;
  transform: translate3d(44%, -4%, -80px) scale(0.76) rotate(4deg);
  opacity: 0.55;
  filter: blur(1px);
}
.spot-item.is-far {
  z-index: 2;
  transform: translate3d(0, -10%, -160px) scale(0.55);
  opacity: 0;
  pointer-events: none;
}

.showcase__info {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-xl);
  padding: clamp(22px, 3.2vw, 36px);
  backdrop-filter: blur(12px);
}
.showcase__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.showcase__rank {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.showcase__sold {
  font-size: 12.5px;
  background: rgba(240, 185, 41, 0.18);
  color: var(--gold-bright);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.showcase__title {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.2;
  margin-bottom: 8px;
}
.showcase__fullname {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 16px;
}
.showcase__price {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-bright);
  margin-bottom: 16px;
}
.showcase__price del {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 10px;
}
.showcase__bullets {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}
.showcase__bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}
.showcase__bullets li::before {
  content: '✓';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(240, 185, 41, 0.22);
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.showcase__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.showcase__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.spot-dot {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 4px;
  border: 2px solid transparent;
  transition: transform var(--d-fast), border-color var(--d-fast);
  overflow: hidden;
}
.spot-dot img { width: 100%; height: 100%; object-fit: contain; }
.spot-dot.is-active {
  border-color: var(--gold-bright);
  transform: translateY(-3px) scale(1.06);
}
@media (max-width: 960px) {
  .showcase__wrap { grid-template-columns: 1fr; }
  .showcase__stage { height: 340px; }
}

/* ==========================================================================
   4. BỘ LỌC & LƯỚI THẺ SẢN PHẨM (Ảnh sản phẩm chính bo góc tròn chuẩn mẫu)
   ========================================================================== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}
.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.f-pill {
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all var(--d-fast);
}
.f-pill:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}
.f-pill.is-active {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
  box-shadow: 0 6px 16px -4px rgba(14, 107, 58, 0.4);
}
@media (max-width: 680px) {
  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 6px;
  }
  .f-pill { flex-shrink: 0; }
}

.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
@media (max-width: 1120px) { .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Thẻ sản phẩm: ảnh chính tách nền trên nền trắng, bo tròn góc như sample-product.png */
.p-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--sh-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.25s;
  will-change: transform;
}
.p-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-hover);
  border-color: rgba(14, 107, 58, 0.32);
}

/* Khung ảnh sản phẩm bo tròn góc (border-radius: 18px) */
.p-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  background: #FFFFFF;
  border: 1px solid rgba(14, 31, 22, 0.06);
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.p-card__img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  border-radius: 14px;
  transition: transform 0.45s var(--ease-out);
  will-change: transform;
}
.p-card:hover .p-card__img {
  transform: scale(1.06) translateY(-3px);
}
.p-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}
.p-badge {
  padding: 4px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  background: var(--forest);
  color: var(--gold-bright);
}
.p-badge--sale {
  background: #D92B2B;
  color: #fff;
}
.p-card__qv {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(11, 51, 32, 0.86);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--d-fast), transform var(--d-fast), background var(--d-fast);
  z-index: 3;
}
.p-card:hover .p-card__qv { opacity: 1; transform: translateY(0); }
.p-card__qv:hover { background: var(--emerald); }
@media (max-width: 768px) {
  .p-card__qv { opacity: 1; transform: none; width: 32px; height: 32px; }
}

.p-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 4px 4px;
}
.p-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-muted);
}
.p-card__rating {
  color: #D98A00;
  font-weight: 700;
}
.p-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  transition: color var(--d-fast);
}
.p-card:hover .p-card__title { color: var(--emerald); }

.p-card__vars {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.p-var-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--ivory);
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: all 0.18s;
}
.p-var-chip.is-on {
  background: rgba(14, 107, 58, 0.1);
  border-color: var(--emerald);
  color: var(--emerald);
}

.p-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.p-card__price {
  font-size: 17px;
  font-weight: 800;
  color: var(--emerald);
  line-height: 1.1;
}
.p-card__price del {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-muted);
}
.p-card__add {
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--emerald);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--d-fast), transform var(--d-fast);
}
.p-card__add:hover {
  background: var(--forest);
  transform: scale(1.03);
}
@media (max-width: 540px) {
  .p-card { padding: 9px; border-radius: 18px; min-width: 0; }
  .p-card__badges { top: 6px; left: 6px; right: 6px; gap: 4px; }
  .p-badge { font-size: 9.5px; padding: 3px 6px; white-space: nowrap; max-width: 72%; overflow: hidden; text-overflow: ellipsis; }
  .p-badge--sale { max-width: none; flex-shrink: 0; }
  .p-card__title { font-size: 13.5px; }
  .p-card__price { font-size: 15px; }
  .p-card__add span { display: none; }
  .p-card__add { width: 36px; height: 36px; padding: 0; justify-content: center; }
}

/* ==========================================================================
   5. TRANG CHI TIẾT SẢN PHẨM — Bố cục chuẩn reference/sample-product.png
   ========================================================================== */
.pdp {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4.5vw, 60px);
  align-items: start;
}
.pdp-gallery {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}
/* Khung ảnh chính lớn bo tròn góc + nút Play/3D giống sample-product.png */
.pdp-main {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #FFFFFF;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--sh-card);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
  cursor: zoom-in;
}
.pdp-main__img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  border-radius: 18px;
  transition: transform 0.45s var(--ease-out);
}
.pdp-main:hover .pdp-main__img { transform: scale(1.04); }
.pdp-main.is-spinning .pdp-main__img {
  animation: pdpShowcaseSpin 3.6s ease-in-out infinite;
}
@keyframes pdpShowcaseSpin {
  0%, 100% { transform: scale(1) rotateY(0deg) translateY(0); }
  25% { transform: scale(1.06) rotateY(12deg) translateY(-6px); }
  75% { transform: scale(1.06) rotateY(-12deg) translateY(-6px); }
}

/* Nút Play tròn ở giữa như sample-product.png (bấm để bật/tắt 3D showcase) */
.pdp-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(11, 40, 26, 0.62);
  backdrop-filter: blur(6px);
  color: #fff;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.35);
  transition: transform var(--d-fast), background var(--d-fast), opacity var(--d-fast);
  z-index: 4;
}
.pdp-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--emerald);
}
.pdp-main.is-spinning .pdp-play-btn {
  top: auto;
  left: auto;
  right: 16px;
  bottom: 16px;
  transform: none;
  width: 44px;
  height: 44px;
  background: var(--emerald);
}

/* Hàng thumbnail bo góc bên dưới + viền màu nhấn khi chọn + ô Xem thêm N ảnh */
.pdp-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.pdp-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #FFFFFF;
  border: 2px solid var(--line);
  padding: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: border-color var(--d-fast), transform var(--d-fast), box-shadow var(--d-fast);
}
.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.pdp-thumb.is-active {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(14, 107, 58, 0.16);
  transform: translateY(-2px);
}
.pdp-thumb--more {
  background: var(--forest);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  border-color: var(--forest);
}
.pdp-thumb--more:hover { background: var(--emerald); }

.pdp-info {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3.2vw, 36px);
  box-shadow: var(--sh-card);
}
.pdp-info__title {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  margin-block: 10px 14px;
}
.pdp-info__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.pdp-info__price-box {
  background: linear-gradient(120deg, var(--sage-soft) 0%, var(--gold-pale) 100%);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-block: 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.pdp-info__price {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  color: var(--emerald);
}
.pdp-info__old {
  font-size: 16px;
  color: var(--ink-muted);
  text-decoration: line-through;
}

.var-group { margin-bottom: 20px; }
.var-group__lbl {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.var-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.var-btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--d-fast);
}
.var-btn.is-active {
  border-color: var(--emerald);
  background: rgba(14, 107, 58, 0.08);
  color: var(--emerald);
  box-shadow: 0 4px 12px rgba(14, 107, 58, 0.14);
}

.qty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.qty-ctrl {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ivory);
  height: 48px;
  padding: 0 6px;
}
.qty-ctrl button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  font-weight: 700;
  font-size: 18px;
  display: grid;
  place-items: center;
}
.qty-ctrl input {
  width: 48px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}

.pdp-desc {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 34px);
}
.pdp-desc h3 {
  font-family: var(--f-display);
  font-size: 22px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.pdp-desc__content {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink);
}
.pdp-desc__content p { margin-bottom: 12px; }
.pdp-desc__content ul { list-style: disc; padding-left: 20px; margin-bottom: 14px; }

@media (max-width: 920px) {
  .pdp { grid-template-columns: minmax(0, 1fr); }
  .pdp-gallery { position: static; min-width: 0; max-width: 100%; }
  .pdp-info { min-width: 0; max-width: 100%; }
}
@media (max-width: 540px) {
  .pdp-thumbs { gap: 8px; }
  .pdp-thumb { border-radius: 12px; padding: 6px; }
  .pdp-thumb--more { font-size: 10.5px; padding: 4px; }
}

/* ==========================================================================
   6. KHỐI TẠO NIỀM TIN & CAM KẾT CHẤT LƯỢNG
   ========================================================================== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--sh-card);
}
.trust-card__ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(14, 107, 58, 0.1);
  color: var(--emerald);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.trust-card h3 { font-size: 17px; margin-bottom: 8px; }
.trust-card p { font-size: 14px; color: var(--ink-soft); }
@media (max-width: 960px) { .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .trust-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   7. CART DRAWER, QUICK VIEW MODAL, LIGHTBOX & TOAST
   ========================================================================== */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 240;
  pointer-events: none;
  visibility: hidden;
}
.cart-drawer.is-open { pointer-events: auto; visibility: visible; }
.cart-drawer__bg {
  position: absolute;
  inset: 0;
  background: rgba(7, 32, 20, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.32s var(--ease-out);
}
.cart-drawer.is-open .cart-drawer__bg { opacity: 1; }
.cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 94vw);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.38s var(--ease-out);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.2);
}
.cart-drawer.is-open .cart-drawer__panel { transform: translateX(0); }
.cart-drawer__head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.c-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--ivory);
  border: 1px solid var(--line);
}
.c-item__img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #fff;
  padding: 5px;
  object-fit: contain;
}
.c-item__name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.c-item__var { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.c-item__price { font-size: 14px; font-weight: 800; color: var(--emerald); margin-top: 4px; }
.c-item__qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: var(--r-pill);
  padding: 3px 6px;
  border: 1px solid var(--line);
}
.c-item__qty button { width: 24px; height: 24px; font-weight: 700; }
.cart-drawer__foot {
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: var(--ivory);
}

/* Lightbox & Quick View Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 16px;
  pointer-events: none;
  visibility: hidden;
}
.modal.is-open { pointer-events: auto; visibility: visible; }
.modal__bg {
  position: absolute;
  inset: 0;
  background: rgba(7, 32, 20, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s;
}
.modal.is-open .modal__bg { opacity: 1; }
.modal__box {
  position: relative;
  z-index: 2;
  width: min(880px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--sh-float);
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition: transform 0.34s var(--ease-out), opacity 0.28s;
}
.modal.is-open .modal__box { transform: translateY(0) scale(1); opacity: 1; }
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ivory);
  display: grid;
  place-items: center;
  z-index: 5;
}

/* Toast Notification */
.toast {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 280;
  background: var(--forest-deep);
  color: #fff;
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--sh-float);
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s var(--ease-out), opacity 0.32s;
}
.toast.is-on { transform: translateY(0); opacity: 1; pointer-events: auto; }

/* ==========================================================================
   8. CHECKOUT, CONTACT, FLOATING CHAT & FOOTER
   ========================================================================== */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--sh-card);
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(14, 31, 22, 0.16);
  background: var(--ivory);
  font-size: 15px;
  transition: border-color var(--d-fast), background var(--d-fast);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--emerald);
  background: #fff;
  outline: none;
}

/* Nút chat nổi (Zalo, Hotline, TikTok, Messenger) */
/* Nút chat nổi (Facebook, Shopee, Zalo, Hotline, TikTok, Messenger) & Nút Mở/Đóng */
.float-chat {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.float-chat__list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: bottom right;
}
.float-chat.is-collapsed .float-chat__list {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.7) translateY(18px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
  margin: 0;
  gap: 0;
}
.float-chat__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--forest);
  color: #fff;
  border: 2px solid var(--gold-bright);
  box-shadow: 0 10px 28px rgba(7, 32, 20, 0.35);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s var(--ease-out);
}
.float-chat__toggle:hover {
  background: var(--emerald);
  transform: scale(1.05);
}
.float-chat__toggle-icon {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.float-chat .float-chat__toggle-icon--open { display: none; }
.float-chat .float-chat__toggle-icon--close { display: inline-block; }
.float-chat.is-collapsed .float-chat__toggle-icon--open { display: inline-block; font-size: 16px; }
.float-chat.is-collapsed .float-chat__toggle-icon--close { display: none; }
.float-chat.is-collapsed .float-chat__toggle {
  background: var(--emerald);
  border-color: var(--gold-bright);
  box-shadow: 0 8px 24px rgba(14, 107, 58, 0.45);
  animation: floatPulse 2.8s infinite;
}
@keyframes floatPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.f-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(7, 32, 20, 0.16);
  font-size: 13px;
  font-weight: 700;
  transition: transform var(--d-fast), background var(--d-fast), color var(--d-fast), box-shadow var(--d-fast);
}
.f-btn:hover { transform: translateX(-4px); background: var(--emerald); color: #fff; }
.f-btn--fb {
  background: #1877F2;
  color: #fff;
  border-color: #1877F2;
  box-shadow: 0 8px 22px rgba(24, 119, 242, 0.35);
}
.f-btn--fb:hover {
  background: #0E65D9;
  color: #fff;
  transform: translateX(-4px);
  box-shadow: 0 10px 26px rgba(24, 119, 242, 0.45);
}
.f-btn--shopee {
  background: linear-gradient(135deg, #FF6633 0%, #EE4D2D 100%);
  color: #fff;
  border-color: #EE4D2D;
  box-shadow: 0 10px 24px rgba(238, 77, 45, 0.34);
}
.f-btn--shopee:hover {
  background: linear-gradient(135deg, #FF7744 0%, #D73818 100%);
  color: #fff;
  transform: translateX(-5px) scale(1.03);
}
.btn--shopee {
  background: linear-gradient(135deg, #FF6633 0%, #EE4D2D 100%);
  color: #fff;
  border: 1px solid #EE4D2D;
  box-shadow: 0 8px 20px -4px rgba(238, 77, 45, 0.35);
}
.btn--shopee:hover {
  background: linear-gradient(135deg, #FF7744 0%, #D73818 100%);
  color: #fff;
  transform: translateY(-2px);
}
.f-btn--zalo { background: #0068FF; color: #fff; border-color: #0068FF; }
.f-btn--phone { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.f-btn--tiktok { background: #111111; color: #fff; border-color: #333333; }
.f-btn--tiktok:hover { background: #000; color: #fff; }
.f-btn--msg { background: linear-gradient(135deg, #00B2FF 0%, #006AFF 50%, #A033FF 100%); color: #fff; border: none; }
.f-btn--msg:hover { opacity: 0.95; }

.m-bottom-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 160;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 8px 8px;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.m-bottom-bar a, .m-bottom-bar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 10px;
}
@media (max-width: 768px) {
  .float-chat {
    bottom: 74px;
    right: 12px;
  }
  .m-bottom-bar { display: grid; }
  body { padding-bottom: 68px; }
}

.footer {
  background: var(--forest-deep);
  color: rgba(246, 245, 240, 0.82);
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer h4 {
  color: var(--gold-bright);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer ul { display: grid; gap: 10px; font-size: 14px; }
.footer a:hover { color: var(--gold-bright); }
.footer__wordmark {
  font-family: var(--f-display);
  font-size: clamp(28px, 6.2vw, 88px);
  color: rgba(255, 255, 255, 0.07);
  text-align: center;
  letter-spacing: 0.12em;
  margin-top: 24px;
  line-height: 1;
  user-select: none;
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .footer__grid { grid-template-columns: 1fr; } }

/* Phương thức thanh toán: tô sáng lựa chọn đang chọn */
#checkoutForm label:has(input[name="payment"]) { border: 1px solid var(--line) !important; background: var(--ivory) !important; }
#checkoutForm label:has(input[name="payment"]:checked) { border: 1.5px solid var(--emerald) !important; background: rgba(14,107,58,0.06) !important; }
