/* =====================================================================
   ATHLOS SPORT STORE - Hệ thống giao diện
   Nền tảng: Bootstrap 5.3 + lớp tùy biến theo Design Token
   Tông chủ đạo: xanh navy trên nền sứ, điểm nhấn vàng champagne
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Design Token
   ------------------------------------------------------------------- */
:root {
  --ath-bg: #F5F7FA;
  --ath-surface: #FFFFFF;
  --ath-surface-2: #EEF2F7;
  --ath-surface-3: #E6EBF2;
  --ath-ink: #14233F;
  --ath-ink-deep: #0E1728;
  --ath-navy-2: #16223A;
  --ath-navy-3: #1E2E4A;
  --ath-navy-line: #26374F;
  --ath-muted: #5A6B84;
  --ath-muted-2: #8A97AE;
  --ath-line: #E1E7F0;
  --ath-line-strong: #CFD8E4;
  --ath-gold: #B08D4C;
  --ath-gold-light: #C9A66B;
  --ath-gold-grad: linear-gradient(135deg, #D8BE86 0%, #B4915A 100%);
  --ath-gold-soft: rgba(176, 141, 76, .14);
  --ath-ink-soft: rgba(20, 35, 63, .08);
  --ath-success: #2F7D5B;
  --ath-success-soft: rgba(47, 125, 91, .1);
  --ath-danger: #B4434B;
  --ath-danger-soft: rgba(180, 67, 75, .1);
  --ath-info: #3D6A9E;
  --ath-info-soft: rgba(61, 106, 158, .1);
  --ath-warning: #A87A22;
  --ath-warning-soft: rgba(168, 122, 34, .12);

  --ath-font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ath-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --text-xs: .8125rem;
  --text-sm: .9375rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.375rem;
  --display: clamp(2.5rem, 5.4vw, 4.75rem);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(20, 35, 63, .05);
  --shadow-sm: 0 1px 2px rgba(20, 35, 63, .05), 0 2px 8px rgba(20, 35, 63, .04);
  --shadow-md: 0 2px 4px rgba(20, 35, 63, .04), 0 10px 24px rgba(20, 35, 63, .08);
  --shadow-lg: 0 4px 10px rgba(20, 35, 63, .05), 0 24px 56px rgba(20, 35, 63, .13);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 160ms;
  --dur: 280ms;
  --dur-slow: 560ms;

  --nav-h: 76px;

  /* Ánh xạ sang biến của Bootstrap */
  --bs-body-font-family: var(--ath-font);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--ath-ink);
  --bs-body-bg: var(--ath-bg);
  --bs-emphasis-color: var(--ath-ink-deep);
  --bs-secondary-color: var(--ath-muted);
  --bs-border-color: var(--ath-line);
  --bs-border-radius: var(--r-sm);
  --bs-border-radius-lg: var(--r-md);
  --bs-border-radius-xl: var(--r-lg);
  --bs-primary: #14233F;
  --bs-primary-rgb: 20, 35, 63;
  --bs-link-color: var(--ath-ink);
  --bs-link-color-rgb: 20, 35, 63;
  --bs-link-hover-color: var(--ath-gold);
  --bs-link-hover-color-rgb: 176, 141, 76;
  --bs-focus-ring-color: rgba(176, 141, 76, .35);
}

/* ---------------------------------------------------------------------
   2. Nền tảng và kiểu chữ
   ------------------------------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--ath-font);
  background: var(--ath-bg);
  color: var(--ath-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(201, 166, 107, .3); color: var(--ath-ink-deep); }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ath-ink-deep);
  line-height: 1.18;
}

a { text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }

img { max-width: 100%; }

.text-muted, .text-body-secondary { color: var(--ath-muted) !important; }
.text-gold { color: var(--ath-gold) !important; }
.text-ink { color: var(--ath-ink) !important; }
.fw-medium { font-weight: 500 !important; }
.tabular { font-variant-numeric: tabular-nums; }
.font-mono { font-family: var(--ath-mono); }
.min-w-0 { min-width: 0 !important; }

.container-xl { --bs-gutter-x: 2rem; }
/* Từ 992px, hàng g-lg-5 có lề âm 24px: padding container phải bằng 24px để không tràn ngang */
@media (min-width: 992px) { .container-xl { --bs-gutter-x: 3rem; } }
@media (min-width: 1400px) { .container-xl { max-width: 1320px; } }

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }

.visually-hidden-focusable:focus {
  position: fixed !important; top: 12px; left: 12px; z-index: 2000;
  background: var(--ath-ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
}

:focus-visible { outline: 2px solid var(--ath-gold); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------------------
   3. Nút bấm
   ------------------------------------------------------------------- */
.btn {
  --bs-btn-font-weight: 500;
  --bs-btn-padding-x: 1.25rem;
  --bs-btn-padding-y: .7rem;
  --bs-btn-border-radius: var(--r-pill);
  --bs-btn-font-size: .9375rem;
  letter-spacing: -.005em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn:focus-visible { outline: 2px solid var(--ath-gold); outline-offset: 2px; box-shadow: none; }
.btn-lg { --bs-btn-padding-x: 1.6rem; --bs-btn-padding-y: .9rem; --bs-btn-font-size: 1rem; }
.btn-sm { --bs-btn-padding-x: .9rem; --bs-btn-padding-y: .45rem; --bs-btn-font-size: .8125rem; }

.btn-ink {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--ath-ink);
  --bs-btn-border-color: var(--ath-ink);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--ath-navy-3);
  --bs-btn-hover-border-color: var(--ath-navy-3);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--ath-ink-deep);
  --bs-btn-active-border-color: var(--ath-ink-deep);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--ath-muted-2);
  --bs-btn-disabled-border-color: var(--ath-muted-2);
}
.btn-ink:hover { box-shadow: 0 8px 22px rgba(20, 35, 63, .22); }

.btn-gold {
  --bs-btn-color: var(--ath-ink-deep);
  --bs-btn-hover-color: var(--ath-ink-deep);
  --bs-btn-active-color: var(--ath-ink-deep);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-border-color: transparent;
  background: var(--ath-gold-grad);
  font-weight: 600;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-gold::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 900ms var(--ease-out);
  z-index: -1;
}
.btn-gold:hover { box-shadow: 0 10px 28px rgba(176, 141, 76, .38); }
.btn-gold:hover::after { transform: translateX(120%); }

.btn-outline-ink {
  --bs-btn-color: var(--ath-ink);
  --bs-btn-border-color: var(--ath-line-strong);
  --bs-btn-hover-color: var(--ath-ink);
  --bs-btn-hover-bg: var(--ath-surface);
  --bs-btn-hover-border-color: var(--ath-ink);
  --bs-btn-active-color: var(--ath-ink);
  --bs-btn-active-bg: var(--ath-surface-2);
  --bs-btn-active-border-color: var(--ath-ink);
  background: transparent;
}

.btn-ghost-light {
  --bs-btn-color: #EAEEF6;
  --bs-btn-border-color: rgba(234, 238, 246, .32);
  --bs-btn-hover-color: var(--ath-ink-deep);
  --bs-btn-hover-bg: #EAEEF6;
  --bs-btn-hover-border-color: #EAEEF6;
  --bs-btn-active-color: var(--ath-ink-deep);
  --bs-btn-active-bg: #fff;
  backdrop-filter: blur(6px);
}

.btn-soft-danger {
  --bs-btn-color: var(--ath-danger);
  --bs-btn-bg: var(--ath-danger-soft);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--ath-danger);
  --bs-btn-hover-border-color: var(--ath-danger);
}

.btn-icon {
  --size: 44px;
  width: var(--size); height: var(--size);
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--ath-ink);
  background: transparent;
  border: 1px solid transparent;
  position: relative;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn-icon:hover { background: var(--ath-surface-2); color: var(--ath-ink); }
.btn-icon:active { transform: scale(.94); }
.btn-icon .bi { font-size: 1.2rem; line-height: 1; }
.btn-icon-sm { --size: 34px; }
.btn-icon-sm .bi { font-size: 1rem; }

.link-underline-grow {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--dur) var(--ease-out), color var(--dur-fast) var(--ease-out);
  padding-bottom: 2px;
}
.link-underline-grow:hover { background-size: 100% 1px; }

.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; color: var(--ath-ink); }
.link-arrow .bi { transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover { color: var(--ath-gold); }
.link-arrow:hover .bi { transform: translateX(4px); }

/* ---------------------------------------------------------------------
   4. Biểu mẫu
   ------------------------------------------------------------------- */
.form-label { font-size: var(--text-sm); font-weight: 500; color: var(--ath-ink); margin-bottom: .45rem; }
.form-control, .form-select {
  border-color: var(--ath-line-strong);
  border-radius: var(--r-sm);
  padding: .72rem .95rem;
  font-size: .9375rem;
  color: var(--ath-ink);
  background-color: var(--ath-surface);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.form-control::placeholder { color: var(--ath-muted-2); }
.form-control:hover, .form-select:hover { border-color: var(--ath-muted-2); }
.form-control:focus, .form-select:focus {
  border-color: var(--ath-gold);
  box-shadow: 0 0 0 4px var(--ath-gold-soft);
}
.form-control-lg { padding: .9rem 1.1rem; border-radius: var(--r-md); }
.form-check-input { border-color: var(--ath-line-strong); }
.form-check-input:checked { background-color: var(--ath-ink); border-color: var(--ath-ink); }
.form-check-input:focus { box-shadow: 0 0 0 4px var(--ath-gold-soft); border-color: var(--ath-gold); }
.form-text { color: var(--ath-muted); font-size: var(--text-xs); }

.form-control.is-invalid, .form-select.is-invalid { border-color: var(--ath-danger); background-image: none; padding-right: .95rem; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 4px var(--ath-danger-soft); }
.form-control.is-valid, .form-select.is-valid { border-color: var(--ath-success); background-image: none; padding-right: .95rem; }
.form-control.is-valid:focus { box-shadow: 0 0 0 4px var(--ath-success-soft); }
.invalid-feedback { color: var(--ath-danger); font-size: var(--text-xs); margin-top: .4rem; }
.invalid-feedback.d-block, .was-validated .invalid-feedback { animation: fieldShake 360ms var(--ease-out); }
@keyframes fieldShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.input-icon { position: relative; }
.input-icon > .bi {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--ath-muted-2); pointer-events: none; transition: color var(--dur-fast) var(--ease-out);
}
.input-icon > .form-control { padding-left: 2.75rem; }
.input-icon:focus-within > .bi { color: var(--ath-gold); }
.input-icon .toggle-password {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--ath-muted); width: 40px; height: 40px; border-radius: 50%;
}
.input-icon .toggle-password:hover { color: var(--ath-ink); background: var(--ath-surface-2); }

.password-meter { height: 4px; border-radius: 4px; background: var(--ath-surface-3); overflow: hidden; margin-top: .6rem; }
.password-meter > span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }

/* ---------------------------------------------------------------------
   5. Thanh thông báo trên cùng
   ------------------------------------------------------------------- */
.topbar {
  background: var(--ath-ink-deep);
  color: #C7D0DF;
  font-size: var(--text-xs);
  letter-spacing: .005em;
}
.topbar .container-xl { min-height: 38px; }
.topbar a { color: #C7D0DF; }
.topbar a:hover { color: #fff; }
.topbar .sep { width: 1px; height: 12px; background: rgba(255, 255, 255, .16); }
.topbar-ticker { overflow: hidden; height: 20px; position: relative; flex: 1; }
.topbar-ticker > span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(100%);
  animation: tickerCycle 12s var(--ease-in-out) infinite;
}
.topbar-ticker > span:nth-child(2) { animation-delay: 4s; }
.topbar-ticker > span:nth-child(3) { animation-delay: 8s; }
@keyframes tickerCycle {
  0% { opacity: 0; transform: translateY(100%); }
  3%, 33.33% { opacity: 1; transform: translateY(0); }
  36.33%, 100% { opacity: 0; transform: translateY(-100%); }
}
@media (min-width: 992px) { .topbar-ticker > span { justify-content: flex-start; } }

/* ---------------------------------------------------------------------
   6. Navbar
   ------------------------------------------------------------------- */
.ath-nav {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.ath-nav.is-scrolled {
  background: rgba(255, 255, 255, .92);
  border-color: var(--ath-line);
  box-shadow: 0 8px 30px rgba(20, 35, 63, .06);
}
.ath-nav .navbar { min-height: var(--nav-h); padding-block: .5rem; }

.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ath-ink-deep); }
.brand img { width: 40px; height: 40px; transition: transform var(--dur-slow) var(--ease-spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.04); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: .2em; color: var(--ath-ink-deep); }
.brand-sub { font-size: .625rem; letter-spacing: .32em; color: var(--ath-gold); font-weight: 500; margin-top: 5px; }
.brand:hover .brand-name { color: var(--ath-ink-deep); }

.ath-nav .nav-link {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ath-ink);
  padding: .6rem .9rem !important;
  position: relative;
  border-radius: var(--r-pill);
}
.ath-nav .nav-link::after {
  content: "";
  position: absolute; left: .9rem; right: .9rem; bottom: .3rem; height: 1.5px;
  background: var(--ath-gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.ath-nav .nav-link.dropdown-toggle::after { display: none; }
.ath-nav .nav-link .caret { font-size: .7rem; margin-left: .3rem; transition: transform var(--dur) var(--ease-out); display: inline-block; }
.ath-nav .nav-link.show .caret { transform: rotate(180deg); }
.ath-nav .nav-link:hover, .ath-nav .nav-link:focus-visible { color: var(--ath-ink-deep); }
.ath-nav .nav-link:hover::after, .ath-nav .nav-link.active::after { transform: scaleX(1); }
.ath-nav .nav-link.active { color: var(--ath-ink-deep); }

/* Dropdown chung */
.dropdown-menu {
  --bs-dropdown-border-color: var(--ath-line);
  --bs-dropdown-border-radius: var(--r-md);
  --bs-dropdown-link-hover-bg: var(--ath-surface-2);
  --bs-dropdown-link-active-bg: var(--ath-ink);
  --bs-dropdown-padding-y: .5rem;
  --bs-dropdown-item-padding-x: 1rem;
  --bs-dropdown-item-padding-y: .55rem;
  --bs-dropdown-font-size: .9375rem;
  box-shadow: var(--shadow-lg);
  padding: .5rem;
}
.dropdown-menu.show { animation: menuIn var(--dur) var(--ease-out); transform-origin: top center; }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-item { border-radius: var(--r-sm); color: var(--ath-ink); display: flex; align-items: center; gap: .65rem; transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.dropdown-item .bi { color: var(--ath-muted); font-size: 1.05rem; }
.dropdown-item:hover .bi { color: var(--ath-ink); }
.dropdown-header { font-size: var(--text-xs); color: var(--ath-muted); font-weight: 500; }

/* Mega menu sản phẩm */
.mega-menu { width: min(760px, 92vw); padding: 1.25rem; }
@media (min-width: 992px) {
  .mega-menu { left: 50% !important; transform: translateX(-50%); }
  .mega-menu.show { animation: megaIn var(--dur) var(--ease-out); }
}
@keyframes megaIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.mega-link {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .8rem .9rem; border-radius: var(--r-md); color: var(--ath-ink);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.mega-link:hover { background: var(--ath-surface-2); color: var(--ath-ink-deep); }
.mega-link .ico {
  flex: none; width: 40px; height: 40px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--ath-surface-2); color: var(--ath-ink);
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.mega-link:hover .ico { background: var(--ath-ink); color: var(--ath-gold-light); }
.mega-link strong { display: block; font-weight: 600; font-size: .9375rem; }
.mega-link small { color: var(--ath-muted); font-size: var(--text-xs); line-height: 1.45; display: block; margin-top: 2px; }
.mega-feature {
  position: relative; border-radius: var(--r-md); overflow: hidden; min-height: 100%;
  background: var(--ath-ink-deep); color: #EAEEF6; display: flex; align-items: flex-end; padding: 1.1rem;
}
.mega-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: transform 1.2s var(--ease-out); }
.mega-feature:hover img { transform: scale(1.05); }
.mega-feature > div { position: relative; }
.mega-feature strong { display: block; font-size: 1.05rem; font-weight: 600; color: #fff; }
.mega-feature small { color: #C7D0DF; }

/* Ô tìm kiếm và gợi ý tức thời */
.nav-search { position: relative; width: 100%; }
.nav-search .form-control {
  border-radius: var(--r-pill);
  background: var(--ath-surface-2);
  border-color: transparent;
  padding: .62rem 1rem .62rem 2.6rem;
  font-size: .9rem;
}
.nav-search .form-control:hover { border-color: var(--ath-line-strong); }
.nav-search .form-control:focus { background: var(--ath-surface); border-color: var(--ath-gold); }
.nav-search > .bi { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ath-muted); pointer-events: none; }
.nav-search kbd {
  position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
  font-family: var(--ath-font); font-size: .7rem; color: var(--ath-muted); background: var(--ath-surface);
  border: 1px solid var(--ath-line); border-radius: 6px; padding: .1rem .4rem; box-shadow: none;
}
@media (min-width: 992px) { .nav-search { width: 280px; } }
@media (min-width: 1200px) { .nav-search { width: 320px; } }

.search-suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1050;
  background: var(--ath-surface); border: 1px solid var(--ath-line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: .4rem; display: none;
  max-height: 420px; overflow-y: auto;
}
.search-suggest.show { display: block; animation: menuIn var(--dur) var(--ease-out); }
.suggest-item { display: flex; align-items: center; gap: .75rem; padding: .5rem; border-radius: var(--r-sm); color: var(--ath-ink); }
.suggest-item:hover, .suggest-item.is-active { background: var(--ath-surface-2); color: var(--ath-ink-deep); }
.suggest-item img { width: 44px; height: 44px; border-radius: var(--r-xs); object-fit: cover; background: var(--ath-surface-2); }
.suggest-item .name { font-size: .875rem; font-weight: 500; line-height: 1.35; }
.suggest-item .price { font-size: var(--text-xs); color: var(--ath-muted); }
.suggest-item mark { background: var(--ath-gold-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
.suggest-empty { padding: .9rem; font-size: .875rem; color: var(--ath-muted); text-align: center; }
.suggest-all { display: block; text-align: center; font-size: .8125rem; font-weight: 500; padding: .6rem; border-top: 1px solid var(--ath-line); margin-top: .3rem; }

.cart-count {
  position: absolute; top: 2px; right: 0;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--ath-gold-grad); color: var(--ath-ink-deep);
  font-size: .6875rem; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px #fff;
  transform: scale(0); transition: transform var(--dur) var(--ease-spring);
}
.cart-count.has-items { transform: scale(1); }
.cart-count.bump { animation: bump 520ms var(--ease-spring); }
@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

.user-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .25rem .8rem .25rem .25rem; border-radius: var(--r-pill); border: 1px solid var(--ath-line); color: var(--ath-ink); font-size: .875rem; font-weight: 500; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.user-chip:hover { border-color: var(--ath-line-strong); background: var(--ath-surface); color: var(--ath-ink); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ath-ink); color: var(--ath-gold-light); font-size: .8125rem; font-weight: 600; flex: none; }

.navbar-toggler { border: 0; padding: .5rem; border-radius: var(--r-sm); }
.navbar-toggler:focus { box-shadow: 0 0 0 3px var(--ath-gold-soft); }
.toggler-bars { width: 22px; height: 14px; position: relative; display: block; }
.toggler-bars span { position: absolute; left: 0; right: 0; height: 1.6px; background: var(--ath-ink); border-radius: 2px; transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast) var(--ease-out); }
.toggler-bars span:nth-child(1) { top: 0; }
.toggler-bars span:nth-child(2) { top: 6px; }
.toggler-bars span:nth-child(3) { top: 12px; }
.navbar-toggler[aria-expanded="true"] .toggler-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .toggler-bars span:nth-child(2) { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .toggler-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 991.98px) {
  .ath-nav .navbar-collapse { padding: .75rem 0 1rem; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
  .ath-nav .nav-link { padding: .8rem .25rem !important; border-bottom: 1px solid var(--ath-line); border-radius: 0; }
  .ath-nav .nav-link::after { display: none; }
  .mega-menu { width: 100%; box-shadow: none; border: 0; padding: .5rem 0; }
  .ath-nav .dropdown-menu.show { animation: none; }
  .nav-search { margin-top: .75rem; }
}

/* ---------------------------------------------------------------------
   7. Hero Carousel (khoảnh khắc chuyển động chủ đạo)
   ------------------------------------------------------------------- */
.hero { position: relative; background: var(--ath-ink-deep); overflow: hidden; }
.hero .carousel-item { min-height: clamp(560px, 78vh, 760px); background: var(--ath-ink-deep); }
.hero .carousel-item > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.1);
  transition: transform 7.5s cubic-bezier(.2, .6, .35, 1);
  will-change: transform;
}
.hero .carousel-item.active > img { transform: scale(1); }
.hero .carousel-item::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(14, 23, 40, .94) 0%, rgba(14, 23, 40, .78) 45%, rgba(14, 23, 40, .35) 78%, rgba(14, 23, 40, .15) 100%),
    linear-gradient(0deg, rgba(14, 23, 40, .65) 0%, rgba(14, 23, 40, 0) 40%);
}
.hero-content { position: relative; z-index: 2; min-height: inherit; display: flex; align-items: center; padding-block: 72px 140px; }
.hero-copy { max-width: 620px; color: #EAEEF6; }
.hero-copy .kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8125rem; color: var(--ath-gold-light); font-weight: 500;
  margin-bottom: 1.4rem;
}
.hero-copy .kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero-copy h1, .hero-copy h2 {
  font-size: var(--display);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.04;
  color: #fff;
  margin-bottom: 1.4rem;
}
@media (min-width: 992px) {
  .hero-copy h1, .hero-copy h2 { font-size: clamp(2.75rem, 4.1vw, 4.25rem); white-space: nowrap; max-width: none; width: max-content; }
}
.hero-copy p.lead { font-size: 1.125rem; font-weight: 300; color: #C7D0DF; line-height: 1.65; max-width: 600px; margin-bottom: 2.2rem; }
.hero-copy .hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-copy .hero-meta { display: flex; gap: 2rem; margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(234, 238, 246, .14); flex-wrap: wrap; }
.hero-copy .hero-meta strong { display: block; font-size: 1.5rem; font-weight: 600; color: #fff; letter-spacing: -.02em; }
.hero-copy .hero-meta span { font-size: var(--text-xs); color: var(--ath-muted-2); }

.hero .carousel-item .hero-copy > * { opacity: 0; transform: translateY(22px); }
.hero .carousel-item.active .hero-copy > * { animation: rise var(--dur-slow) var(--ease-out) forwards; }
.hero .carousel-item.active .hero-copy > *:nth-child(1) { animation-delay: 120ms; }
.hero .carousel-item.active .hero-copy > *:nth-child(2) { animation-delay: 220ms; }
.hero .carousel-item.active .hero-copy > *:nth-child(3) { animation-delay: 320ms; }
.hero .carousel-item.active .hero-copy > *:nth-child(4) { animation-delay: 420ms; }
.hero .carousel-item.active .hero-copy > *:nth-child(5) { animation-delay: 520ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-controls {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 36px;
}
.hero-controls .container-xl { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.hero-indicators { display: flex; gap: .75rem; flex: 1; max-width: 520px; }
.hero-indicators button,
.hero-indicators [data-bs-target] {
  flex: 1; width: auto; height: auto; margin: 0; text-indent: 0; opacity: 1; box-sizing: border-box;
  border: 0; background: transparent; padding: 10px 0; text-align: left; color: var(--ath-muted-2);
  font-size: var(--text-xs); font-weight: 500; transition: color var(--dur) var(--ease-out);
}
.hero-indicators button .bar { display: block; height: 2px; background: rgba(234, 238, 246, .18); border-radius: 2px; overflow: hidden; margin-bottom: .6rem; }
.hero-indicators button .bar::after { content: ""; display: block; height: 100%; background: var(--ath-gold-light); transform: scaleX(0); transform-origin: left; }
.hero-indicators button.active { color: #EAEEF6; }
.hero-indicators button.active .bar::after { animation: progress var(--hero-interval, 6500ms) linear forwards; }
.hero-indicators button .label { display: none; }
@media (min-width: 768px) { .hero-indicators button .label { display: block; } }
@keyframes progress { to { transform: scaleX(1); } }

.hero-arrows { display: flex; gap: .5rem; }
.hero-arrow {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(234, 238, 246, .25);
  background: rgba(14, 23, 40, .35); color: #EAEEF6; display: grid; place-items: center;
  backdrop-filter: blur(8px);
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.hero-arrow:hover { background: #EAEEF6; color: var(--ath-ink-deep); border-color: #EAEEF6; }
.hero-arrow:active { transform: scale(.94); }

@media (max-width: 767.98px) {
  .hero .carousel-item { min-height: 620px; }
  .hero .carousel-item::before { background: linear-gradient(0deg, rgba(14, 23, 40, .95) 0%, rgba(14, 23, 40, .7) 55%, rgba(14, 23, 40, .35) 100%); }
  .hero-content { align-items: flex-end; padding-block: 56px 88px; }
  .hero-copy { padding-bottom: 0; }
  .hero-copy .hero-meta { display: none; }
  .hero-copy h1, .hero-copy h2 { font-size: 2.4rem; }
  .hero-copy p.lead { font-size: 1rem; margin-bottom: 1.6rem; }
  .hero-copy .hero-actions .btn { --bs-btn-padding-y: .75rem; }
}

/* ---------------------------------------------------------------------
   8. Tiêu đề khu vực, dải cam kết, danh mục
   ------------------------------------------------------------------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: clamp(28px, 4vw, 44px); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -.03em; margin: 0 0 .5rem; }
.section-head p { color: var(--ath-muted); margin: 0; max-width: 560px; }
.section-head .eyebrow { display: inline-block; font-size: .8125rem; color: var(--ath-gold); font-weight: 500; margin-bottom: .6rem; }

.value-strip { background: var(--ath-surface); border-block: 1px solid var(--ath-line); }
.value-item { display: flex; align-items: center; gap: 1rem; padding: 1.6rem 0; }
.value-item .ico {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ath-surface-2); color: var(--ath-ink); font-size: 1.25rem;
}
.value-item strong { display: block; font-size: .9375rem; font-weight: 600; color: var(--ath-ink-deep); }
.value-item span { font-size: var(--text-xs); color: var(--ath-muted); }
@media (min-width: 992px) {
  .value-strip .col-lg-3 + .col-lg-3 .value-item { border-left: 1px solid var(--ath-line); padding-left: 1.75rem; }
}

.cat-tile {
  position: relative; display: block; border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 4 / 5; background: var(--ath-ink-deep); color: #fff; isolation: isolate;
}
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); z-index: -2; }
.cat-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(14, 23, 40, .92) 0%, rgba(14, 23, 40, .6) 26%, rgba(14, 23, 40, 0) 55%); transition: opacity var(--dur) var(--ease-out); }
.cat-tile .cat-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.25rem 1.3rem 1.35rem; }
.cat-tile h3 { font-size: 1.125rem; line-height: 1.3; color: #fff; margin: 0 0 .3rem; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-wrap: nowrap; }
.cat-tile small { display: block; color: #C7D0DF; font-size: var(--text-xs); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-tile .go {
  position: absolute; top: 1rem; right: 1rem;
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(14, 23, 40, .42); color: #fff; backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile:hover .go { background: var(--ath-gold-grad); color: var(--ath-ink-deep); transform: rotate(-45deg); }
.cat-tile-wide { aspect-ratio: auto; height: 100%; min-height: 320px; }

/* ---------------------------------------------------------------------
   9. Thẻ sản phẩm
   ------------------------------------------------------------------- */
.p-card {
  --bs-card-border-color: var(--ath-line);
  --bs-card-border-radius: var(--r-lg);
  --bs-card-spacer-x: 1.15rem;
  --bs-card-spacer-y: 1.1rem;
  background: var(--ath-surface);
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.p-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.p-card-media { position: relative; aspect-ratio: 1 / 1; background: var(--ath-surface-2); overflow: hidden; }
.p-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.p-card:hover .p-card-media img { transform: scale(1.06); }
.p-badges { position: absolute; top: .85rem; left: .85rem; display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; z-index: 2; pointer-events: none; }
.p-badge {
  font-size: .75rem; font-weight: 600; padding: .3rem .6rem; border-radius: var(--r-pill);
  background: var(--ath-ink); color: var(--ath-gold-light); letter-spacing: .01em;
}
.p-badge-soft { background: rgba(255, 255, 255, .9); color: var(--ath-ink); font-weight: 500; backdrop-filter: blur(6px); }
.p-quick-add {
  position: absolute; left: .85rem; right: .85rem; bottom: .85rem; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: var(--r-pill); padding: .7rem 1rem;
  background: rgba(255, 255, 255, .94); color: var(--ath-ink-deep); font-size: .875rem; font-weight: 600;
  backdrop-filter: blur(10px); box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.p-card:hover .p-quick-add, .p-quick-add:focus-visible { opacity: 1; transform: translateY(0); }
.p-quick-add:hover { background: var(--ath-ink); color: #fff; }
.p-quick-add:disabled { background: rgba(255, 255, 255, .85); color: var(--ath-muted); cursor: not-allowed; }
.p-quick-add.is-added { background: var(--ath-success); color: #fff; }
@media (hover: none) {
  .p-quick-add { opacity: 1; transform: none; left: auto; width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  .p-quick-add span { display: none; }
}
.p-brand { font-size: var(--text-xs); color: var(--ath-muted); margin: 0 0 .3rem; font-weight: 500; }
.p-title { font-size: .975rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.4; margin: 0 0 .7rem; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-title a { color: var(--ath-ink-deep); }
.p-title a:hover { color: var(--ath-ink-deep); }
.p-price { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.p-price-now { font-weight: 600; font-size: 1.05rem; color: var(--ath-ink-deep); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.p-price-old { font-size: var(--text-xs); color: var(--ath-muted-2); font-variant-numeric: tabular-nums; }

/* Khung xương khi đang nạp dữ liệu AJAX */
.skeleton { position: relative; overflow: hidden; background: var(--ath-surface-2); border-radius: var(--r-sm); }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s var(--ease-in-out) infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-card { border: 1px solid var(--ath-line); border-radius: var(--r-lg); overflow: hidden; background: var(--ath-surface); }
.sk-card .sk-media { aspect-ratio: 1 / 1; border-radius: 0; }
.sk-card .sk-line { height: 12px; margin: 1rem 1.15rem 0; }
.sk-card .sk-line.short { width: 40%; }
.sk-card .sk-line.mid { width: 70%; margin-bottom: 1.2rem; }

/* Bộ lọc dạng tab trên trang chủ */
.chip-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--ath-line-strong); background: transparent; color: var(--ath-ink);
  padding: .5rem 1rem; border-radius: var(--r-pill); font-size: .875rem; font-weight: 500;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.chip:hover { border-color: var(--ath-ink); }
.chip.active { background: var(--ath-ink); color: #fff; border-color: var(--ath-ink); }

/* ---------------------------------------------------------------------
   10. Banner khuyến mãi và khối giới thiệu XML
   ------------------------------------------------------------------- */
.promo {
  position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--ath-ink-deep); color: #EAEEF6;
  min-height: 440px; display: flex; align-items: center; isolation: isolate;
}
.promo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; object-position: 70% center; }
.promo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 23, 40, .94) 0%, rgba(14, 23, 40, .75) 45%, rgba(14, 23, 40, .1) 100%); }
.promo-body { padding: clamp(32px, 6vw, 72px); max-width: 700px; }
.promo h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -.03em; margin-bottom: 1rem; }
.promo p { color: #C7D0DF; font-weight: 300; font-size: 1.05rem; max-width: 520px; }
.voucher {
  display: inline-flex; align-items: center; gap: .9rem; margin: 1.25rem 0 1.75rem;
  padding: .5rem .5rem .5rem 1.1rem; border-radius: var(--r-pill);
  border: 1px dashed rgba(201, 166, 107, .6); background: rgba(201, 166, 107, .08);
}
.voucher code { font-family: var(--ath-mono); color: var(--ath-gold-light); font-size: 1rem; letter-spacing: .12em; font-weight: 600; }
.voucher button { border: 0; border-radius: var(--r-pill); padding: .45rem .9rem; font-size: .8125rem; font-weight: 600; background: rgba(234, 238, 246, .12); color: #EAEEF6; transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.voucher button:hover { background: #EAEEF6; color: var(--ath-ink-deep); }

.xml-teaser {
  border-radius: var(--r-xl); background: var(--ath-surface); border: 1px solid var(--ath-line);
  overflow: hidden;
}
.code-window { background: var(--ath-ink-deep); padding: 1.25rem 1.5rem 1.5rem; font-family: var(--ath-mono); font-size: .8125rem; line-height: 1.75; color: #C7D0DF; position: relative; }
.xml-teaser .code-window { height: 100%; min-height: 340px; }
.code-window .tok-com { font-style: normal; }
.code-window .dots { display: flex; gap: 6px; margin-bottom: 1.1rem; }
.code-window .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--ath-navy-line); }
.code-window pre { margin: 0; white-space: pre; overflow-x: auto; color: inherit; font: inherit; }
.tok-tag { color: #7FA3C7; }
.tok-attr { color: var(--ath-gold-light); }
.tok-val { color: #A9C7A4; }
.tok-com { color: #5F6E87; font-style: italic; }
.tok-text { color: #EAEEF6; }
.code-caret { display: inline-block; width: 8px; height: 1.1em; background: var(--ath-gold-light); vertical-align: text-bottom; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.feature-list { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: 1rem; }
.feature-list li { display: flex; gap: .9rem; align-items: flex-start; }
.feature-list .bi { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ath-gold-soft); color: var(--ath-gold); font-size: .95rem; }
.feature-list strong { display: block; font-weight: 600; font-size: .9375rem; color: var(--ath-ink-deep); }
.feature-list span { font-size: .875rem; color: var(--ath-muted); }

/* ---------------------------------------------------------------------
   11. Accordion (Collapse)
   ------------------------------------------------------------------- */
.accordion-flush-lux .accordion-item { background: transparent; border: 0; border-bottom: 1px solid var(--ath-line); }
.accordion-flush-lux .accordion-button {
  background: transparent; box-shadow: none; padding: 1.35rem 0; font-weight: 500; font-size: 1.05rem; color: var(--ath-ink-deep); letter-spacing: -.01em;
}
.accordion-flush-lux .accordion-button::after {
  background-image: none; content: "\F64D"; font-family: "bootstrap-icons"; font-size: 1rem;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ath-line-strong);
  display: grid; place-items: center; transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.accordion-flush-lux .accordion-button:not(.collapsed)::after { transform: rotate(45deg); background: var(--ath-ink); color: #fff; border-color: var(--ath-ink); }
.accordion-flush-lux .accordion-button:focus-visible { outline: 2px solid var(--ath-gold); outline-offset: 4px; }
.accordion-flush-lux .accordion-body { padding: 0 3.5rem 1.5rem 0; color: var(--ath-muted); line-height: 1.7; }
.collapsing { transition: height var(--dur) var(--ease-out); }

/* ---------------------------------------------------------------------
   12. Footer
   ------------------------------------------------------------------- */
.site-footer { background: var(--ath-ink-deep); color: var(--ath-muted-2); font-size: .9rem; position: relative; overflow: hidden; }
.site-footer::before {
  content: ""; position: absolute; width: 640px; height: 640px; right: -220px; top: -320px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(201, 166, 107, .12), transparent);
  pointer-events: none;
}
.site-footer .footer-top { padding-block: clamp(56px, 7vw, 88px) 48px; position: relative; }
.site-footer h4 { font-size: .9375rem; color: #EAEEF6; font-weight: 600; margin-bottom: 1.1rem; letter-spacing: -.005em; }
.site-footer a { color: var(--ath-muted-2); }
.site-footer a:hover { color: #EAEEF6; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.site-footer ul li > a { white-space: nowrap; }
.site-footer h4 { line-height: 46px; margin-bottom: .6rem; }
.footer-brand img { height: 46px; width: auto; display: block; }
.footer-brand p { margin-top: .6rem; line-height: 1.75; max-width: 360px; }
.social { display: flex; gap: .5rem; margin-top: 1.5rem; }
.social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ath-navy-line); display: grid; place-items: center; color: #C7D0DF; transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.social a:hover { background: var(--ath-gold-grad); color: var(--ath-ink-deep); border-color: transparent; }
.contact-line { display: flex; gap: .75rem; align-items: flex-start; }
.contact-line .bi { color: var(--ath-gold-light); margin-top: 2px; }
.footer-bottom { border-top: 1px solid var(--ath-navy-line); padding-block: 1.5rem; font-size: var(--text-xs); position: relative; }
.pay-methods { display: flex; gap: .5rem; flex-wrap: wrap; }
.pay-methods span { border: 1px solid var(--ath-navy-line); border-radius: 6px; padding: .2rem .55rem; font-size: .6875rem; font-weight: 600; color: #C7D0DF; letter-spacing: .04em; }
.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 1020; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--ath-line); background: rgba(255, 255, 255, .9); color: var(--ath-ink); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md); display: grid; place-items: center;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--ath-ink); color: #fff; }

/* ---------------------------------------------------------------------
   13. Offcanvas (giỏ hàng, bộ lọc, menu quản trị)
   ------------------------------------------------------------------- */
.offcanvas { --bs-offcanvas-width: 440px; --bs-offcanvas-transition: transform .45s var(--ease-out); border-color: var(--ath-line) !important; }
.offcanvas-backdrop.show { opacity: .4; }
.offcanvas-backdrop { background: var(--ath-ink-deep); }
.offcanvas-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--ath-line); }
.offcanvas-title { font-weight: 600; font-size: 1.125rem; letter-spacing: -.015em; }
.offcanvas-body { padding: 1.25rem 1.5rem; }
.btn-close:focus { box-shadow: 0 0 0 3px var(--ath-gold-soft); }

.ship-progress { background: var(--ath-surface-2); border-radius: var(--r-md); padding: .9rem 1rem; font-size: .8125rem; color: var(--ath-muted); margin-bottom: 1.25rem; }
.ship-progress strong { color: var(--ath-ink-deep); }
.ship-progress .track { height: 4px; border-radius: 4px; background: var(--ath-surface-3); margin-top: .65rem; overflow: hidden; }
.ship-progress .track span { display: block; height: 100%; width: 100%; background: var(--ath-gold-grad); transform-origin: left; transform: scaleX(0); transition: transform var(--dur-slow) var(--ease-out); }

.cart-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--ath-line); animation: itemIn var(--dur) var(--ease-out); }
.cart-item.removing { animation: itemOut var(--dur) var(--ease-in-out) forwards; }
@keyframes itemIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes itemOut { to { opacity: 0; transform: translateX(24px); } }
.cart-item img { width: 76px; height: 76px; border-radius: var(--r-sm); object-fit: cover; background: var(--ath-surface-2); flex: none; }
.cart-item .name { font-size: .9rem; font-weight: 500; line-height: 1.4; color: var(--ath-ink-deep); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .meta { font-size: var(--text-xs); color: var(--ath-muted); margin-top: 2px; }
.cart-item .price { font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--ath-line-strong); border-radius: var(--r-pill); height: 34px; }
.qty button { width: 32px; height: 32px; border: 0; background: transparent; color: var(--ath-ink); border-radius: 50%; display: grid; place-items: center; transition: background-color var(--dur-fast) var(--ease-out); }
.qty button:hover { background: var(--ath-surface-2); }
.qty button:disabled { color: var(--ath-line-strong); background: transparent; }
.qty input { width: 34px; border: 0; text-align: center; font-size: .875rem; font-weight: 600; background: transparent; color: var(--ath-ink); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-lg { height: 48px; }
.qty-lg button { width: 44px; height: 44px; }
.qty-lg input { width: 44px; font-size: 1rem; }
.cart-remove { border: 0; background: transparent; color: var(--ath-muted); font-size: var(--text-xs); padding: .25rem 0; transition: color var(--dur-fast) var(--ease-out); }
.cart-remove:hover { color: var(--ath-danger); }
.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--ath-muted); }
.cart-empty .ring { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 1.25rem; display: grid; place-items: center; background: var(--ath-surface-2); font-size: 2rem; color: var(--ath-ink); }
.cart-summary { border-top: 1px solid var(--ath-line); padding: 1.25rem 1.5rem 1.5rem; background: var(--ath-surface); }
.summary-row { display: flex; justify-content: space-between; font-size: .9rem; color: var(--ath-muted); margin-bottom: .5rem; font-variant-numeric: tabular-nums; }
.summary-row.total { color: var(--ath-ink-deep); font-size: 1.05rem; font-weight: 600; margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--ath-line-strong); }

/* Hiệu ứng ảnh bay vào giỏ hàng */
.fly-thumb { position: fixed; z-index: 2000; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; pointer-events: none; box-shadow: var(--shadow-lg); transition: transform 720ms cubic-bezier(.5, -0.3, .7, 1), opacity 720ms var(--ease-out); }

/* ---------------------------------------------------------------------
   14. Đầu trang nội dung (trang con)
   ------------------------------------------------------------------- */
.page-hero { position: relative; background: var(--ath-ink-deep); color: #EAEEF6; overflow: hidden; padding-block: clamp(48px, 7vw, 88px); isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(201, 166, 107, .16), transparent 70%),
    radial-gradient(500px 280px at 0% 100%, rgba(127, 163, 199, .12), transparent 70%);
}
.page-hero .grid-lines { position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(180deg, #000, transparent); }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -.035em; margin: .75rem 0 .75rem; }
.page-hero p { color: #C7D0DF; font-weight: 300; max-width: 640px; margin: 0; font-size: 1.05rem; }
.page-hero > .container-xl > * { animation: rise var(--dur-slow) var(--ease-out) both; }
.page-hero > .container-xl > *:nth-child(2) { animation-delay: 80ms; }
.page-hero > .container-xl > *:nth-child(3) { animation-delay: 160ms; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--ath-muted-2); --bs-breadcrumb-item-active-color: #EAEEF6; font-size: var(--text-xs); margin: 0; }
.breadcrumb a { color: var(--ath-muted-2); }
.breadcrumb a:hover { color: #EAEEF6; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; }
.breadcrumb-light { --bs-breadcrumb-item-active-color: var(--ath-ink); }
.breadcrumb-light a { color: var(--ath-muted); }
.breadcrumb-light a:hover { color: var(--ath-ink); }

/* ---------------------------------------------------------------------
   15. Trang danh sách sản phẩm và bộ lọc
   ------------------------------------------------------------------- */
.filter-panel { background: var(--ath-surface); border: 1px solid var(--ath-line); border-radius: var(--r-lg); padding: .5rem 1.25rem; }
@media (min-width: 992px) { .filter-sticky { position: sticky; top: calc(var(--nav-h) + 24px); } }
.filter-group { border-bottom: 1px solid var(--ath-line); }
.filter-group:last-child { border-bottom: 0; }
.filter-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; background: transparent; padding: 1.05rem 0; font-weight: 600; font-size: .9375rem; color: var(--ath-ink-deep); }
.filter-toggle .bi { transition: transform var(--dur) var(--ease-out); color: var(--ath-muted); }
.filter-toggle.collapsed .bi { transform: rotate(-90deg); }
.filter-body { padding-bottom: 1.1rem; }
.filter-option { display: flex; align-items: center; justify-content: space-between; padding: .4rem .6rem; margin-inline: -.6rem; border-radius: var(--r-sm); font-size: .9rem; color: var(--ath-ink); cursor: pointer; transition: background-color var(--dur-fast) var(--ease-out); }
.filter-option:hover { background: var(--ath-surface-2); }
.filter-option .count { font-size: var(--text-xs); color: var(--ath-muted); background: var(--ath-surface-2); padding: .05rem .5rem; border-radius: var(--r-pill); }
.filter-option input { margin-right: .65rem; }
.filter-option.active { font-weight: 600; color: var(--ath-ink-deep); }
.price-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: center; }
.price-inputs .form-control { padding: .55rem .7rem; font-size: .875rem; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.toolbar .result { font-size: .9rem; color: var(--ath-muted); }
.toolbar .result strong { color: var(--ath-ink-deep); }
.toolbar .form-select { width: auto; min-width: 200px; border-radius: var(--r-pill); padding-block: .55rem; font-size: .875rem; }
.active-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.active-filters a { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; padding: .35rem .5rem .35rem .8rem; border-radius: var(--r-pill); background: var(--ath-surface); border: 1px solid var(--ath-line); color: var(--ath-ink); }
.active-filters a:hover { border-color: var(--ath-danger); color: var(--ath-danger); }
.empty-state { text-align: center; padding: 4rem 1rem; background: var(--ath-surface); border: 1px dashed var(--ath-line-strong); border-radius: var(--r-lg); }
.empty-state .ring { width: 80px; height: 80px; margin: 0 auto 1.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--ath-surface-2); font-size: 1.75rem; color: var(--ath-ink); }

.pagination { --bs-pagination-color: var(--ath-ink); --bs-pagination-border-color: var(--ath-line); --bs-pagination-hover-bg: var(--ath-surface-2); --bs-pagination-hover-color: var(--ath-ink-deep); --bs-pagination-hover-border-color: var(--ath-line-strong); --bs-pagination-active-bg: var(--ath-ink); --bs-pagination-active-border-color: var(--ath-ink); --bs-pagination-focus-box-shadow: 0 0 0 3px var(--ath-gold-soft); --bs-pagination-disabled-color: var(--ath-muted-2); gap: .4rem; }
.pagination .page-link { border-radius: var(--r-pill) !important; min-width: 42px; height: 42px; display: grid; place-items: center; font-size: .9rem; font-weight: 500; }

/* ---------------------------------------------------------------------
   16. Chi tiết sản phẩm
   ------------------------------------------------------------------- */
.pd-media { position: relative; background: var(--ath-surface); border: 1px solid var(--ath-line); border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 1 / 1; cursor: zoom-in; }
.pd-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur) var(--ease-out); transform-origin: var(--zx, 50%) var(--zy, 50%); }
.pd-media.zooming img { transform: scale(1.8); }
.pd-info h1 { font-size: clamp(1.75rem, 3vw, 2.375rem); letter-spacing: -.03em; margin: .5rem 0 1rem; }
.pd-price { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pd-price .now { font-size: 1.875rem; font-weight: 600; letter-spacing: -.02em; color: var(--ath-ink-deep); font-variant-numeric: tabular-nums; }
.pd-price .old { color: var(--ath-muted-2); font-variant-numeric: tabular-nums; }
.pd-price .save { font-size: .8125rem; font-weight: 600; padding: .25rem .65rem; border-radius: var(--r-pill); background: var(--ath-gold-soft); color: var(--ath-gold); }
.pd-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--ath-line); border: 1px solid var(--ath-line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 1.75rem; }
.pd-meta > div { background: var(--ath-surface); padding: .85rem 1rem; }
.pd-meta small { display: block; font-size: var(--text-xs); color: var(--ath-muted); }
.pd-meta strong { font-weight: 600; font-size: .9375rem; }
.size-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.size-grid input { position: absolute; opacity: 0; pointer-events: none; }
.size-grid label {
  min-width: 56px; height: 46px; padding: 0 1rem; border: 1px solid var(--ath-line-strong); border-radius: var(--r-sm);
  display: grid; place-items: center; font-weight: 500; font-size: .9rem; cursor: pointer; background: var(--ath-surface);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.size-grid label:hover { border-color: var(--ath-ink); }
.size-grid input:checked + label { background: var(--ath-ink); color: #fff; border-color: var(--ath-ink); }
.size-grid input:focus-visible + label { outline: 2px solid var(--ath-gold); outline-offset: 2px; }
.size-grid label:active { transform: scale(.96); }
.stock-dot { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--ath-muted); }
.stock-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ath-success); box-shadow: 0 0 0 4px var(--ath-success-soft); }
.stock-dot.low::before { background: var(--ath-warning); box-shadow: 0 0 0 4px var(--ath-warning-soft); }
.stock-dot.out::before { background: var(--ath-danger); box-shadow: 0 0 0 4px var(--ath-danger-soft); }
.perk-list { display: grid; gap: .75rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--ath-line); }
.perk-list div { display: flex; gap: .75rem; align-items: center; font-size: .875rem; color: var(--ath-muted); }
.perk-list .bi { color: var(--ath-ink); font-size: 1.1rem; }

/* ---------------------------------------------------------------------
   17. Trang xác thực
   ------------------------------------------------------------------- */
.auth-wrap { min-height: calc(100vh - var(--nav-h) - 38px); display: grid; }
@media (min-width: 992px) { .auth-wrap { grid-template-columns: 1.05fr 1fr; } }
.auth-visual { position: relative; background: var(--ath-ink-deep); color: #EAEEF6; overflow: hidden; display: none; isolation: isolate; }
@media (min-width: 992px) { .auth-visual { display: flex; align-items: flex-end; padding: 56px; } }
.auth-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: slowZoom 18s var(--ease-out) both; }
@keyframes slowZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.auth-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(14, 23, 40, .95) 0%, rgba(14, 23, 40, .45) 55%, rgba(14, 23, 40, .25) 100%); }
.auth-visual blockquote { font-size: 1.6rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.35; color: #fff; max-width: 480px; margin: 0 0 1rem; }
.auth-visual cite { font-style: normal; color: var(--ath-gold-light); font-size: .875rem; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: clamp(32px, 6vw, 72px) 20px; }
.auth-card { width: 100%; max-width: 440px; animation: rise var(--dur-slow) var(--ease-out) both; }
.auth-card h1 { font-size: 2rem; letter-spacing: -.03em; margin-bottom: .5rem; }
.auth-card .sub { color: var(--ath-muted); margin-bottom: 2rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; color: var(--ath-muted-2); font-size: var(--text-xs); margin: 1.5rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--ath-line); }
.demo-account { font-size: .8125rem; background: var(--ath-surface); border: 1px solid var(--ath-line); border-radius: var(--r-md); padding: .9rem 1rem; color: var(--ath-muted); }
.demo-account button { border: 0; background: transparent; padding: 0; color: var(--ath-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ath-line-strong); }
.demo-account button:hover { text-decoration-color: var(--ath-gold); }

/* ---------------------------------------------------------------------
   18. Bề mặt, bảng, trạng thái
   ------------------------------------------------------------------- */
.surface { background: var(--ath-surface); border: 1px solid var(--ath-line); border-radius: var(--r-lg); }
.surface-pad { padding: clamp(20px, 3vw, 32px); }
.surface-title { font-size: 1.125rem; font-weight: 600; letter-spacing: -.015em; margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.table-lux { --bs-table-bg: transparent; --bs-table-hover-bg: var(--ath-surface-2); --bs-table-border-color: var(--ath-line); margin: 0; font-size: .9rem; }
.table-lux > thead th { font-size: var(--text-xs); font-weight: 600; color: var(--ath-muted); background: var(--ath-surface-2); border-bottom: 1px solid var(--ath-line); padding: .85rem 1rem; white-space: nowrap; }
.table-lux > thead th:first-child { border-top-left-radius: var(--r-sm); }
.table-lux > thead th:last-child { border-top-right-radius: var(--r-sm); }
.table-lux > tbody td { padding: .9rem 1rem; vertical-align: middle; color: var(--ath-ink); }
.table-lux > tbody tr { transition: background-color var(--dur-fast) var(--ease-out); }
.table-lux .thumb { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background: var(--ath-surface-2); }
.table-wrap { border: 1px solid var(--ath-line); border-radius: var(--r-md); overflow: hidden; background: var(--ath-surface); }
.table-wrap .table-responsive { margin: 0; }

.status { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: var(--r-pill); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending { background: var(--ath-warning-soft); color: var(--ath-warning); }
.status-shipping { background: var(--ath-info-soft); color: var(--ath-info); }
.status-done { background: var(--ath-success-soft); color: var(--ath-success); }
.status-cancel { background: var(--ath-danger-soft); color: var(--ath-danger); }
.status-neutral { background: var(--ath-surface-2); color: var(--ath-muted); }

.alert { border-radius: var(--r-md); border: 1px solid transparent; font-size: .9rem; }
.alert-soft-danger { background: var(--ath-danger-soft); color: var(--ath-danger); border-color: rgba(180, 67, 75, .2); }
.alert-soft-success { background: var(--ath-success-soft); color: var(--ath-success); border-color: rgba(47, 125, 91, .2); }
.alert-soft-info { background: var(--ath-info-soft); color: var(--ath-info); border-color: rgba(61, 106, 158, .2); }

.modal-content { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--ath-line); padding: 1.1rem 1.5rem; }
.modal-body { padding: 1.5rem; }
.modal.fade .modal-dialog { transform: translateY(16px) scale(.98); transition: transform var(--dur) var(--ease-out); }
.modal.show .modal-dialog { transform: none; }
.modal-backdrop.show { opacity: .45; }
.modal-backdrop { background: var(--ath-ink-deep); }

/* ---------------------------------------------------------------------
   19. Thanh toán và tài khoản
   ------------------------------------------------------------------- */
.checkout-steps { display: flex; gap: .5rem; align-items: center; font-size: .8125rem; color: var(--ath-muted-2); flex-wrap: wrap; }
.checkout-steps .step { display: inline-flex; align-items: center; gap: .5rem; }
.checkout-steps .step b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; border: 1px solid rgba(234, 238, 246, .25); }
.checkout-steps .step.done, .checkout-steps .step.current { color: #EAEEF6; }
.checkout-steps .step.current b { background: var(--ath-gold-grad); color: var(--ath-ink-deep); border-color: transparent; }
.checkout-steps .step.done b { background: rgba(234, 238, 246, .12); }
.checkout-steps .line { width: 32px; height: 1px; background: rgba(234, 238, 246, .2); }
.order-line { display: flex; gap: .9rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--ath-line); }
.order-line img { width: 60px; height: 60px; border-radius: var(--r-sm); object-fit: cover; background: var(--ath-surface-2); }
.order-line .q { position: relative; }
.order-line .q span { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--ath-ink); color: #fff; font-size: .6875rem; font-weight: 600; display: grid; place-items: center; padding: 0 5px; }
.pay-option { display: flex; gap: .9rem; align-items: center; border: 1px solid var(--ath-line-strong); border-radius: var(--r-md); padding: 1rem 1.1rem; cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.pay-option:hover { border-color: var(--ath-ink); }
.pay-option:has(input:checked) { border-color: var(--ath-ink); box-shadow: 0 0 0 3px var(--ath-ink-soft); background: var(--ath-surface); }
.pay-option .bi { font-size: 1.4rem; color: var(--ath-ink); }
.pay-option small { display: block; color: var(--ath-muted); font-size: var(--text-xs); }

.success-mark { width: 96px; height: 96px; margin: 0 auto 1.5rem; }
.success-mark circle { stroke: var(--ath-success); stroke-width: 2; fill: none; stroke-dasharray: 290; stroke-dashoffset: 290; animation: draw 700ms var(--ease-out) forwards; }
.success-mark path { stroke: var(--ath-success); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 420ms 520ms var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.account-nav .nav-link { color: var(--ath-ink); border-radius: var(--r-sm); padding: .7rem .9rem; display: flex; align-items: center; gap: .7rem; font-size: .9375rem; }
.account-nav .nav-link:hover { background: var(--ath-surface-2); }
.account-nav .nav-link.active { background: var(--ath-ink); color: #fff; }

/* ---------------------------------------------------------------------
   20. Khu vực quản trị
   ------------------------------------------------------------------- */
.admin-body { background: var(--ath-bg); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { --bs-offcanvas-width: 272px; background: var(--ath-ink-deep); color: #C7D0DF; border-right: 0 !important; }
@media (min-width: 992px) {
  .admin-sidebar { width: 272px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; background-color: var(--ath-ink-deep) !important; }
}
[aria-expanded="true"] .collapse-chevron { transform: rotate(180deg); }
.collapse-chevron { transition: transform var(--dur) var(--ease-out); }
.admin-sidebar .offcanvas-header { border-color: var(--ath-navy-line); }
.admin-sidebar .brand-name { color: #EAEEF6; }
.admin-sidebar .nav-label { font-size: .6875rem; color: var(--ath-muted-2); padding: 1.25rem .9rem .5rem; font-weight: 500; letter-spacing: .02em; }
.admin-sidebar .nav-link { color: #C7D0DF; display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: var(--r-sm); font-size: .9rem; transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); position: relative; }
.admin-sidebar .nav-link .bi { font-size: 1.05rem; color: var(--ath-muted-2); transition: color var(--dur-fast) var(--ease-out); }
.admin-sidebar .nav-link:hover { background: rgba(234, 238, 246, .06); color: #fff; }
.admin-sidebar .nav-link.active { background: rgba(201, 166, 107, .12); color: #fff; }
.admin-sidebar .nav-link.active .bi { color: var(--ath-gold-light); }
.admin-sidebar .nav-link.active::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ath-gold-grad); }
.admin-sidebar .nav-link .badge { margin-left: auto; background: var(--ath-gold-grad); color: var(--ath-ink-deep); font-weight: 700; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { position: sticky; top: 0; z-index: 1020; height: 68px; display: flex; align-items: center; gap: 1rem; padding: 0 clamp(16px, 3vw, 32px); background: rgba(245, 247, 250, .85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--ath-line); }
.admin-topbar h1 { font-size: 1.125rem; margin: 0; letter-spacing: -.015em; }
.admin-content { padding: clamp(16px, 3vw, 32px); flex: 1; }
.admin-content > * { animation: rise var(--dur-slow) var(--ease-out) both; }

.stat-card { background: var(--ath-surface); border: 1px solid var(--ath-line); border-radius: var(--r-lg); padding: 1.35rem 1.4rem; height: 100%; position: relative; overflow: hidden; transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .ico { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--ath-surface-2); color: var(--ath-ink); font-size: 1.15rem; margin-bottom: 1rem; }
.stat-card .label { font-size: .8125rem; color: var(--ath-muted); }
.stat-card .value { font-size: 1.75rem; font-weight: 600; letter-spacing: -.03em; color: var(--ath-ink-deep); font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: .25rem; }
.stat-card.is-featured { background: var(--ath-ink-deep); border-color: var(--ath-ink-deep); }
.stat-card.is-featured .ico { background: rgba(201, 166, 107, .14); color: var(--ath-gold-light); }
.stat-card.is-featured .label { color: var(--ath-muted-2); }
.stat-card.is-featured .value { color: #fff; }

.img-drop { border: 1.5px dashed var(--ath-line-strong); border-radius: var(--r-md); padding: 1.25rem; text-align: center; background: var(--ath-surface); transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); cursor: pointer; position: relative; }
.img-drop:hover, .img-drop.dragover { border-color: var(--ath-gold); background: var(--ath-gold-soft); }
.img-drop img { width: 100%; max-width: 220px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-sm); margin-bottom: .75rem; background: var(--ath-surface-2); }
.img-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------------------------------------------------------------------
   21. Trang tra cứu XML (XMLHttpRequest + DOM)
   ------------------------------------------------------------------- */
.xhr-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.xhr-step { border: 1px solid var(--ath-line); border-radius: var(--r-md); padding: .8rem .9rem; background: var(--ath-surface); position: relative; overflow: hidden; transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }
.xhr-step small { display: block; font-size: .6875rem; color: var(--ath-muted); font-family: var(--ath-mono); }
.xhr-step strong { font-size: .8125rem; font-weight: 600; color: var(--ath-muted); transition: color var(--dur) var(--ease-out); }
.xhr-step::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--ath-gold-grad); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-slow) var(--ease-out); }
.xhr-step.done { border-color: rgba(176, 141, 76, .35); }
.xhr-step.done strong { color: var(--ath-ink-deep); }
.xhr-step.done::after { transform: scaleX(1); }
@media (max-width: 575.98px) { .xhr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.xml-log { font-family: var(--ath-mono); font-size: .75rem; background: var(--ath-ink-deep); color: #C7D0DF; border-radius: var(--r-md); padding: 1rem 1.1rem; height: 188px; overflow-y: auto; line-height: 1.8; }
.xml-log .t { color: var(--ath-muted-2); margin-right: .6rem; }
.xml-log .ok { color: #A9C7A4; }
.xml-log .warn { color: var(--ath-gold-light); }
.xml-log .err { color: #E58C93; }
.xml-log > div { animation: itemIn var(--dur) var(--ease-out); }

.xml-table tbody tr { cursor: pointer; }
.xml-table tbody tr.is-current { background: var(--ath-gold-soft) !important; box-shadow: inset 3px 0 0 var(--ath-gold); }
.xml-table tbody tr.row-in { animation: rowIn 420ms var(--ease-out) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.xml-table th.sortable { cursor: pointer; user-select: none; }
.xml-table th.sortable:hover { color: var(--ath-ink); }
.xml-table th .sort-ico { opacity: .4; margin-left: .25rem; font-size: .7rem; }
.xml-table th.sorted .sort-ico { opacity: 1; color: var(--ath-gold); }
.id-pill { font-family: var(--ath-mono); font-size: .75rem; padding: .15rem .5rem; border-radius: var(--r-xs); background: var(--ath-surface-2); color: var(--ath-ink); }

.node-inspector { background: var(--ath-ink-deep); color: #C7D0DF; border-radius: var(--r-lg); padding: 1.35rem; position: relative; overflow: hidden; }
.node-inspector h3 { color: #EAEEF6; font-size: 1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.node-inspector .kv { display: grid; grid-template-columns: 130px 1fr; gap: .45rem 1rem; font-size: .8125rem; }
.node-inspector .kv dt { color: var(--ath-muted-2); font-weight: 400; font-family: var(--ath-mono); font-size: .75rem; padding-top: 1px; }
.node-inspector .kv dd { margin: 0; color: #EAEEF6; word-break: break-word; }
.node-inspector .kv dd code { color: var(--ath-gold-light); font-family: var(--ath-mono); font-size: .75rem; }
.node-inspector.flash { animation: inspectorFlash 520ms var(--ease-out); }
@keyframes inspectorFlash { 0% { box-shadow: 0 0 0 0 rgba(201, 166, 107, .55); } 100% { box-shadow: 0 0 0 14px rgba(201, 166, 107, 0); } }
.nav-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1.25rem; }
.nav-pad button { border: 1px solid var(--ath-navy-line); background: rgba(234, 238, 246, .04); color: #EAEEF6; border-radius: var(--r-sm); padding: .6rem .4rem; font-size: .75rem; font-family: var(--ath-mono); display: flex; flex-direction: column; align-items: center; gap: .25rem; transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.nav-pad button .bi { font-size: 1rem; }
.nav-pad button:hover:not(:disabled) { background: rgba(201, 166, 107, .14); border-color: rgba(201, 166, 107, .45); color: #fff; }
.nav-pad button:active:not(:disabled) { transform: scale(.96); }
.nav-pad button:disabled { opacity: .35; cursor: not-allowed; }
.path-trail { font-family: var(--ath-mono); font-size: .75rem; color: var(--ath-muted-2); margin-bottom: 1rem; word-break: break-all; }
.path-trail b { color: var(--ath-gold-light); font-weight: 500; }

.dom-tree { font-family: var(--ath-mono); font-size: .8rem; line-height: 1.9; max-height: 520px; overflow: auto; padding: .25rem .25rem .25rem 0; }
.dom-tree ul { list-style: none; margin: 0; padding-left: 1.1rem; border-left: 1px dashed var(--ath-line-strong); }
.dom-tree > ul { border-left: 0; padding-left: 0; }
.dom-tree li { position: relative; }
.dom-tree .node { display: inline-flex; align-items: center; gap: .35rem; padding: 0 .4rem; border-radius: var(--r-xs); cursor: pointer; transition: background-color var(--dur-fast) var(--ease-out); }
.dom-tree .node:hover { background: var(--ath-surface-2); }
.dom-tree .node.is-current { background: var(--ath-gold-soft); outline: 1px solid rgba(176, 141, 76, .5); }
.dom-tree .tw { width: 16px; display: inline-grid; place-items: center; color: var(--ath-muted); transition: transform var(--dur-fast) var(--ease-out); }
.dom-tree li.closed > .node .tw { transform: rotate(-90deg); }
.dom-tree li.closed > ul { display: none; }
.dom-tree .tg { color: var(--ath-info); }
.dom-tree .at { color: var(--ath-gold); }
.dom-tree .tx { color: var(--ath-muted); }

.validate-result { border-radius: var(--r-md); padding: 1rem 1.1rem; font-size: .875rem; display: none; }
.validate-result.show { display: block; animation: rise var(--dur) var(--ease-out); }
.validate-result.ok { background: var(--ath-success-soft); color: var(--ath-success); border: 1px solid rgba(47, 125, 91, .25); }
.validate-result.fail { background: var(--ath-danger-soft); color: var(--ath-danger); border: 1px solid rgba(180, 67, 75, .25); }
.validate-result ul { margin: .5rem 0 0; padding-left: 1.1rem; }

.nav-tabs-lux { border: 0; gap: .25rem; background: var(--ath-surface-2); padding: .3rem; border-radius: var(--r-pill); display: inline-flex; flex-wrap: wrap; }
.nav-tabs-lux .nav-link { border: 0; border-radius: var(--r-pill); color: var(--ath-muted); font-size: .875rem; font-weight: 500; padding: .5rem 1rem; transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.nav-tabs-lux .nav-link:hover { color: var(--ath-ink); }
.nav-tabs-lux .nav-link.active { background: var(--ath-surface); color: var(--ath-ink-deep); box-shadow: var(--shadow-sm); }
.tab-pane.fade { transition: opacity var(--dur) var(--ease-out); }

/* ---------------------------------------------------------------------
   22. Toast thông báo
   ------------------------------------------------------------------- */
.toast-stack { position: fixed; z-index: 2100; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: .6rem; align-items: flex-end; pointer-events: none; }
@media (max-width: 575.98px) { .toast-stack { left: 12px; right: 12px; bottom: 12px; align-items: stretch; } }
.lux-toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: .8rem; min-width: 300px; max-width: 400px;
  background: var(--ath-ink-deep); color: #EAEEF6; border-radius: var(--r-md); padding: .9rem 1rem; box-shadow: var(--shadow-lg);
  animation: toastIn 420ms var(--ease-out) both; position: relative; overflow: hidden;
}
.lux-toast.out { animation: toastOut 300ms var(--ease-in-out) forwards; }
.lux-toast .ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; background: rgba(234, 238, 246, .1); }
.lux-toast.success .ico { background: rgba(169, 199, 164, .18); color: #A9C7A4; }
.lux-toast.danger .ico { background: rgba(229, 140, 147, .18); color: #E58C93; }
.lux-toast.warning .ico, .lux-toast.info .ico { background: rgba(201, 166, 107, .18); color: var(--ath-gold-light); }
.lux-toast .msg { font-size: .875rem; line-height: 1.5; padding-top: 4px; flex: 1; }
.lux-toast .close { border: 0; background: transparent; color: var(--ath-muted-2); padding: 2px; line-height: 1; }
.lux-toast .close:hover { color: #fff; }
.lux-toast .timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--ath-gold-light); transform-origin: left; animation: timer 4.2s linear forwards; opacity: .7; }
@keyframes timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* ---------------------------------------------------------------------
   23. Hiển thị khi cuộn
   ------------------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 720ms var(--ease-out), transform 720ms var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------
   24. Tôn trọng thiết lập giảm chuyển động
   ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero .carousel-item > img { transform: none !important; }
  .topbar-ticker > span:first-child { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
   25. Tinh chỉnh đáp ứng
   ------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  .container-xl { --bs-gutter-x: 2rem; }
  .p-card { --bs-card-spacer-x: .85rem; --bs-card-spacer-y: .85rem; }
  .p-title { font-size: .875rem; }
  .p-price-now { font-size: .95rem; }
  .section-head { align-items: flex-start; }
  .node-inspector .kv { grid-template-columns: 1fr; gap: .15rem; }
  .node-inspector .kv dd { margin-bottom: .5rem; }
  .value-item { flex-direction: column; align-items: flex-start; gap: .75rem; padding: 1.25rem 0; }
  .cat-tile .go { display: none; }
  .cat-tile .cat-body { padding: 1rem; }
  .cat-tile h3 { font-size: 1rem; }
  .xhr-step strong { font-size: .72rem; word-break: break-all; }
}

/* Tiêu đề: chia dòng cân bằng, không để một chữ rơi xuống dòng riêng */
h1, h2, h3, .h1, .h2, .h3 { text-wrap: balance; }

/* Đoạn văn ngắn ở cột hẹp: các dòng dài gần bằng nhau nên mép phải gần như thẳng,
   khoảng cách giữa các chữ giữ tự nhiên (căn đều hai lề ở cột hẹp làm giãn khoảng trắng) */
.hero-copy p.lead,
.section-head p,
.promo p,
.page-hero p,
.footer-brand p {
  text-align: left;
  text-wrap: balance;
}

/* Đoạn văn dài ở cột rộng: căn đều hai lề */
.accordion-flush-lux .accordion-body,
.pd-info > p,
.text-justify {
  text-align: justify;
  text-justify: inter-word;
  text-wrap: pretty;
}

@media print {
  .topbar, .ath-nav, .site-footer, .back-to-top, .toast-stack { display: none !important; }
}
