/* ============================================================
   PEACHY POST — GIAO DIỆN
   Token màu do `start.mjs brand` của taste-skill chia ra từ
   chính màu hồng của shop. Thang khoảng cách 4→128, cỡ chữ và
   luật một-màn-hình theo hệ của skill.

   Màu nhấn #d92d4c là hồng đào đậm: bản hồng tươi #ff6b81 chỉ
   đạt 2.5:1 trên nền, không đủ cho chữ và vòng focus (cần 3:1
   cho vòng, 4.5:1 cho nhãn nút). Nền trang vẫn hồng.
   ============================================================ */

/* ---------- 0. Phông chữ (Typography) ---------- */
@font-face {
  font-family: 'DFVN Hogfish';
  src: url('../fonts/DFVN Hogfish.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DFVN LazyFox';
  src: url('../fonts/DFVN LazyFox.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}

html {
  scroll-padding-top: 0;
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

/* ---------- 2. Token ---------- */
:root {
  --bg: #fff0f5;
  --surface: #ffd9e4;
  --ink: #1f2a55;
  --muted: #3d4568;
  --accent: #d92d4c;
  --accent-dk: #bf2440;
  --on-accent: #ffffff;
  --inverse: #1f2a55;
  --footer-bg: #24294a;
  --nav-scrolled-bg: rgba(255, 240, 245, 0.86);
  --inv-ink: #fff0f5;
  --inv-muted: #cfccdd;
  --card: #fffdfe;
  --line: rgba(31, 42, 85, 0.16);

  --font-display:
    'DFVN Hogfish', 'Nunito', system-ui, -apple-system, sans-serif;
  --font-body: 'DFVN LazyFox', 'Nunito', system-ui, -apple-system, sans-serif;
  --font: var(--font-body);
  --t-h1: clamp(34px, 4.4vw, 72px);
  --t-h2: clamp(28px, 3.1vw, 48px);
  --t-h3: clamp(22px, 1.7vw, 28px);
  --t-lead: clamp(17px, 1.15vw, 20px);
  --t-card: 20px;
  --t-body: 16px;
  --t-small: 14px;
  --t-label: 13px;

  --nav: 72px;
  --padt: 96px;
  --padb: 96px;
  --gut: 80px;
  --hgap: 48px;
  --hpadb: 64px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  --r-lg: 20px;
  --r-md: 12px;
  --r-sm: 8px;
  --r-btn: 999px;

  --m-in: 150ms;
  --m-out: 120ms;
  --m-press: 90ms;
  --m-fast: 180ms;
  --m-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --m-enter: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 640px) {
  :root {
    --nav: 56px;
    --padt: 96px;
    --padb: 96px;
    --gut: 24px;
    --hgap: 40px;
    --hpadb: 24px;
  }
}

/* ---------- 3. Nền chung ---------- */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.15;
  text-wrap: balance;
}
h1 {
  font-size: var(--t-h1);
}
h2 {
  font-size: var(--t-h2);
}
h3 {
  font-size: var(--t-h3);
}

p {
  margin: 0;
  text-wrap: pretty;
}
ul,
dl,
dd {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}
a {
  color: inherit;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
}

/* ---------- 4. Khung ---------- */
.wrap {
  width: min(100% - 2 * var(--gut), 1280px);
  margin-inline: auto;
}

.section {
  height: calc(var(--h, 1) * 100svh);
  padding-top: var(--padt);
  padding-bottom: var(--padb);
  display: flex;
  flex-direction: column;
}
.section > .wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.section--surface {
  background: var(--surface);
}

#san-pham {
  height: auto;
  min-height: 0;
}
#hoi-dap {
  height: auto;
  min-height: 0;
}

.section__intro {
  font-family: var(--font-body);
  margin-top: var(--s-5);
  max-width: 62ch;
  color: var(--muted);
  font-size: var(--t-lead);
  line-height: 1.6;
}

/* nội dung một section dồn lên đầu, phần trống nằm ở đáy:
   khoảng không giữa hai section vì thế luôn bằng padding, không
   bị nội dung giãn ra làm lệch nhịp */
.section > .wrap {
  justify-content: flex-start;
}

/* hai cột: chữ bên trái, hình bên phải, mép trên thẳng nhau.
   gap 24 = nhịp 12 cột (cột 7 bắt đầu đúng ở x 732) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  align-items: start;
}
.split--gap {
  margin-top: var(--s-7);
}

/* khung hình minh hoạ ở cột phải của một split */
.frame {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame svg {
  width: 100%;
  height: auto;
  max-height: 340px;
}

/* khối nội dung trong section, canh giữa phần còn lại */
.section__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: var(--s-6);
}

/* ---------- 5. Nút ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-5);
  border: 2px solid var(--ink);
  border-radius: var(--r-btn);
  background: transparent;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: normal;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--m-in) var(--m-ease),
    border-color var(--m-in) var(--m-ease),
    transform var(--m-in) var(--m-ease);
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-1px);
  }
  .btn--primary:hover {
    background: var(--accent-dk);
    border-color: var(--accent-dk);
  }
  .btn:not(.btn--primary):hover {
    background: rgba(31, 42, 85, 0.08);
  }
}
.btn:active {
  transform: translateY(1px) scale(0.985);
  transition-duration: var(--m-press);
}
.btn[aria-disabled='true'] {
  background: var(--surface);
  border-color: transparent;
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------- 6. Header ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  height: var(--nav);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
.nav__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.brand__mark svg,
.brand__mark img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.brand__name {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin-left: auto;
}
.nav__links a,
.nav__links .nav__link-btn {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  padding: var(--s-2) 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nav__links a::after,
.nav__links .nav__link-btn::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--m-in) var(--m-ease);
}
.nav__links a[aria-current='page']::after {
  transform: scaleX(1);
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover::after,
  .nav__links .nav__link-btn:hover::after {
    transform: scaleX(1);
  }
}
.nav__cta {
  flex: 0 0 auto;
}
.nav__toggle {
  display: none;
}

.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  padding: var(--s-3) var(--s-4);
  background: var(--inverse);
  color: var(--inv-ink);
  font-size: var(--t-small);
  text-decoration: none;
  border-radius: 0 0 var(--r-sm) 0;
  transform: translateY(-120%);
  transition: transform var(--m-in) var(--m-ease);
}
.skip-link:focus {
  transform: translateY(0);
}

.sheet {
  position: fixed;
  inset: var(--nav) 0 0;
  background: var(--bg);
  z-index: 9;
  padding: var(--s-5) var(--gut);
  overflow-y: auto;
}
.sheet[hidden] {
  display: none;
}
.sheet__nav {
  display: flex;
  flex-direction: column;
}
.sheet__nav a,
.sheet__nav .nav__link-btn {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-display);
  font-size: var(--t-card);
  font-weight: normal;
  text-align: left;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.sheet__cta {
  width: 100%;
  margin-top: var(--s-5);
}

/* ---------- 7. Hero ----------
   Kiểu hero--product: một hàng chữ ở trên, rồi chính sản phẩm
   (sáu tấm thiếp) chiếm phần còn lại của màn hình đầu. */
.hero {
  padding-top: calc(var(--nav) + var(--s-6));
  padding-bottom: var(--s-7);
  display: flex;
  flex-direction: column;
  overflow: clip;
}
.hero > .wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.hero-text {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.hero__notice {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.5;
  padding-top: 6px;
  margin-bottom: var(--s-2);
  letter-spacing: 0.02em;
}
.hero__h1 {
  line-height: 1.38;
  padding-top: 0.12em;
}
.hero__h1 .line {
  display: block;
  padding-top: 0.15em;
  margin-top: -0.15em;
  overflow: hidden;
}
.hero__h1 .line > span {
  display: block;
}
.hero__lead {
  font-family: var(--font-body);
  margin-top: var(--s-3);
  max-width: 46ch;
  font-size: var(--t-lead);
  color: var(--muted);
  line-height: 1.5;
}
.hero__actions {
  margin-top: var(--s-4);
}

/* sàn sản phẩm: sáu tấm thiếp bày cạnh nhau, tấm giữa to nhất */
.hero__stage {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: var(--s-5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 26px);
}
.hero__card {
  flex: 1 1 1px;
  max-width: 190px;
  aspect-ratio: 5 / 7;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  padding: 10px;
  display: flex;
}
.hero__card svg,
.hero__card img {
  width: 100%;
  height: 100%;
}
.hero__card img {
  object-fit: cover;
  border-radius: var(--r-sm);
}
.hero__card--lead {
  max-width: 236px;
}

/* sàn 3D: canvas do three-scene.js chèn vào.
   canvas đặt absolute để chiều cao của sàn không phụ thuộc vào
   chính canvas (nếu không, sàn và canvas khoá nhau và cùng sập). */
.hero__stage.is-3d {
  position: relative;
  display: block;
  min-height: clamp(260px, 42vh, 440px);
  touch-action: pan-y;
}
.hero__stage.is-3d canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  z-index: 2;
}

/* Sáu thẻ phẳng nằm dưới canvas. Chúng là ảnh dự phòng thật:
   canvas không vẽ được (WebGL lỗi, shader bị từ chối, driver cũ)
   thì lớp này vẫn hiện. Chỉ ẩn khi canvas đã vẽ được khung đầu. */
.hero__stage.is-live .hero__card {
  visibility: hidden;
}

/* nút gợi ý tương tác: nằm TRÊN sàn 3D, không phải chú thích
   dưới hình; tắt hẳn với bàn phím/chuột không kéo được */
.hero__hint {
  position: absolute;
  right: var(--s-4);
  bottom: var(--s-4);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-btn);
  background: rgba(255, 253, 254, 0.88);
  border: 1px solid var(--line);
  font-size: var(--t-label);
  color: var(--muted);
  pointer-events: none;
}
.hero__hint[hidden] {
  display: none;
}
.hero__stage.is-3d {
  position: relative;
}

.hero__note {
  font-size: var(--t-small);
  color: var(--muted);
}

/* ---------- 8. Lưới thẻ sản phẩm ----------
   minmax(0, 1fr) để cột co được dưới bề rộng chữ, không tràn ngang. */
.grid--cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}

.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  transition:
    transform var(--m-fast) var(--m-ease),
    border-color var(--m-fast) var(--m-ease);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 42, 85, 0.38);
  }
}

.card__art {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: var(--s-3);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card__art svg,
.card__art img {
  width: 100%;
  height: 100%;
}
.card__art img {
  object-fit: cover;
  border-radius: var(--r-sm);
}

.card__text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.card__body {
  padding-top: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.card__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.25;
}
.card__name-en {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
}
.card__tagline {
  font-family: var(--font-body);
  margin-top: var(--s-2);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}
.card__foot {
  margin-top: auto;
  padding-top: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.card__foot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.card__price {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: normal;
  white-space: nowrap;
}
.card__actions {
  display: flex;
  align-items: center;
}
.card__buy {
  width: 100%;
  padding: 0 var(--s-4);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.card__open {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  cursor: pointer;
}

/* ---------- 9. Khối chi tiết (tiles) ---------- */
.mb {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  /* gap 24 = nhịp 12 cột, cột phải bắt đầu đúng ở x 732 */
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  align-items: center;
  margin-top: var(--s-6);
}
.mb__art {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  height: 100%;
  max-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mb__art svg {
  width: 100%;
  height: 100%;
  max-height: 400px;
}

.tiles {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  flex: 1 1 auto;
  min-height: 0;
}
.tile {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.tile h3 {
  font-size: var(--t-card);
}
.tile p {
  margin-top: var(--s-2);
  font-size: var(--t-small);
  color: var(--muted);
  line-height: 1.55;
}
.tile__icon {
  display: block;
  margin-bottom: var(--s-2);
}
.tile__icon svg {
  width: 40px;
  height: 40px;
}
.tile__specs {
  margin-top: auto;
  padding-top: var(--s-4);
  display: flex;
  flex-direction: column;
}
.tile__specs > div {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-2) 0;
  border-top: 1px solid var(--line);
}
.tile__specs dt {
  font-size: var(--t-label);
  color: var(--muted);
}
.tile__specs dd {
  font-size: var(--t-label);
  text-align: right;
}

/* ---------- 10. Hỏi đáp + về shop ---------- */
.faq {
  display: flex;
  flex-direction: column;
  align-self: start;
  width: 100%;
}
.faq li {
  padding: var(--s-5) 0;
  border-top: 1px solid var(--line);
}
.faq li:last-child {
  border-bottom: 1px solid var(--line);
}
.faq__q {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 17px;
}
.faq__a {
  font-family: var(--font-body);
  margin-top: var(--s-2);
  color: var(--muted);
}

.about {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.about h3 {
  font-size: var(--t-card);
  font-weight: 600;
}
.about p {
  color: var(--muted);
}
.about__art {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about__art svg {
  width: 150px;
  height: 150px;
}

/* ---------- 11. Kết + footer ---------- */
.closing {
  background: var(--footer-bg, #24294a);
  color: var(--inv-ink);
  padding-block: var(--s-7);
}
.closing__contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-5);
}
.closing__title {
  font-size: clamp(24px, 2.4vw, 34px);
  color: #ffe9a8;
  letter-spacing: 0.01em;
}
.closing__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-3) var(--s-7);
}
.closing__item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--inv-ink);
  text-decoration: none;
  transition:
    color var(--m-in) var(--m-ease),
    background-color var(--m-in) var(--m-ease),
    transform var(--m-in) var(--m-ease);
}
.closing__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
@media (hover: hover) and (pointer: fine) {
  .closing__item:hover {
    color: #ffd9e4;
    background: rgba(255, 240, 245, 0.08);
    transform: translateY(-1px);
  }
}

/* ---------- 12. Modal chi tiết ---------- */
#modal-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: var(--s-4);
  background: rgba(31, 42, 85, 0.5);
  overflow-y: auto;
}
#modal-root[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(100%, 760px);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
  align-items: start;
}
.modal__art {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: var(--s-4);
  aspect-ratio: 1 / 1;
}
.modal__art svg,
.modal__art img {
  width: 100%;
  height: 100%;
}
.modal__art img {
  object-fit: cover;
  border-radius: var(--r-sm);
}
.modal__name {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: normal;
}
.modal__name-en {
  font-family: var(--font-body);
  margin-top: var(--s-1);
  font-size: 15px;
  color: var(--muted);
}
.modal__price {
  font-family: var(--font-display);
  margin-top: var(--s-5);
  font-size: var(--t-h3);
  font-weight: normal;
}
.modal__desc {
  font-family: var(--font-body);
  margin-top: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.modal__desc-en {
  font-family: var(--font-body);
  color: var(--muted);
  font-size: var(--t-small);
}
.modal__specs {
  font-family: var(--font-body);
  margin-top: var(--s-5);
}
.modal__specs li {
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--muted);
}
.modal__specs li:last-child {
  border-bottom: 1px solid var(--line);
}
.modal__actions {
  margin-top: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.modal__actions .btn {
  width: 100%;
}
.modal__ext-link {
  border-color: var(--line);
  font-size: 15px;
  color: var(--ink);
}
.modal__close {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  z-index: 15;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(31, 42, 85, 0.12);
}
@media (hover: hover) and (pointer: fine) {
  .modal__close:hover {
    border-color: rgba(31, 42, 85, 0.38);
  }
}

/* ---------- 13. Hero vào trang, một lần ----------
   Chỉ ẩn khi <html> đã có class m-enter (script trong head thêm).
   Script không chạy thì trang hiện đủ, không giấu chữ nào. */

.m-enter .hero__notice,
.m-enter .hero__lead,
.m-enter .hero__actions,
.m-enter .hero__stage {
  opacity: 0;
}

/* dòng h1 ẩn bằng mặt nạ (overflow) chứ không bằng opacity,
   để chữ không bao giờ kẹt ở trạng thái trong suốt */
.m-enter .hero__h1 .line > span {
  transform: translateY(105%);
}

.m-enter.m-enter-done .hero__h1 .line {
  overflow: visible;
}
.m-enter.m-enter-done .hero__h1 .line > span {
  animation: rise 700ms var(--m-enter) both;
}
.m-enter.m-enter-done .hero__h1 .line:nth-child(2) > span {
  animation-delay: 80ms;
}
.m-enter.m-enter-done .hero__notice {
  animation: fadeUp 520ms var(--m-enter) both;
}
.m-enter.m-enter-done .hero__lead {
  animation: fadeUp 520ms var(--m-enter) 240ms both;
}
.m-enter.m-enter-done .hero__actions {
  animation: fadeUp 520ms var(--m-enter) 300ms both;
}
.m-enter.m-enter-done .hero__stage {
  animation: settle 1100ms var(--m-enter) 100ms both;
}

@keyframes rise {
  from {
    transform: translateY(105%);
    opacity: 1;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes fadeUp {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes settle {
  from {
    transform: scale(0.98);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- 15. Bộ tải ----------
   Một lần mỗi lần mở trang, không chặn nội dung: trang đã dựng
   xong thì tấm này tan đi trong 700ms. */
.loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--s-5);
  background: var(--bg);
  transition:
    opacity 600ms var(--m-ease),
    visibility 0s linear 600ms;
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
}
.loader__mark svg,
.loader__mark img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-inline: auto;
  object-fit: cover;
  display: block;
  animation: loaderBob 1.6s var(--m-ease) infinite alternate;
}
.loader__bar {
  width: 132px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.loader__fill {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  animation: loaderSlide 1.15s var(--m-ease) infinite;
}
.loader__text {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: center;
}

@keyframes loaderBob {
  from {
    transform: translateY(0) rotate(-3deg);
  }
  to {
    transform: translateY(-8px) rotate(3deg);
  }
}
@keyframes loaderSlide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(320%);
  }
}

/* ---------- 16. Tầng máy ----------
   tier-high : animation đầy đủ + sàn 3D
   tier-low  : chỉ animation CSS (không có 3D)
   tier-min  : không animation, trang tĩnh          */

/* tầng thấp: dùng cơ chế .reveal-item/.is-inview thống nhất bên dưới */

/* tầng cao: nền sản phẩm sáng hơn một chút cho canvas nổi */
.tier-high .hero__stage.is-3d {
  background: transparent;
}

/* tầng tối thiểu: tắt hết chuyển động của lớp animation */
.tier-min .loader {
  display: none;
}
.tier-min .card,
.tier-min .tile {
  opacity: 1;
  transform: none;
}
.tier-min .hero__hint {
  display: none;
}
.tier-min .page-intro {
  display: none;
}

/* ---------- 17. Responsive ---------- */

/* 640–1023: hai cột thẻ, nav gọn lại */
@media (max-width: 1023px) {
  .grid--cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav__links {
    display: none;
  }
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-left: auto;
    min-height: 44px;
    padding: 0 var(--s-4);
    border: 2px solid var(--line);
    border-radius: var(--r-btn);
    background: transparent;
    cursor: pointer;
  }
  .nav__toggle-bars,
  .nav__toggle-bars::before,
  .nav__toggle-bars::after {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
  }
  .nav__toggle-bars {
    position: relative;
  }
  .nav__toggle-bars::before,
  .nav__toggle-bars::after {
    content: '';
    position: absolute;
    left: 0;
  }
  .nav__toggle-bars::before {
    top: -5px;
  }
  .nav__toggle-bars::after {
    top: 5px;
  }
  .nav__toggle-label {
    font-size: var(--t-small);
  }

  .mb {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .mb__art {
    max-height: 300px;
  }
  .modal {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .modal__art {
    max-width: 300px;
  }
}

/* điện thoại: section cao theo bội số màn hình, một cột */
@media (max-width: 640px) {
  .hero {
    padding-top: calc(var(--nav) + var(--s-5));
  }
  .hero__lead {
    font-size: var(--t-body);
  }
  .hero__stage {
    gap: 8px;
    margin-top: var(--s-5);
  }
  .hero__card {
    padding: 5px;
    border-width: 1.5px;
  }
  .hero__card--lead {
    max-width: 36vw;
  }

  .section {
    height: auto;
    min-height: 0;
  }
  .closing {
    padding-block: var(--s-6);
  }
  .closing__list {
    flex-direction: column;
    gap: var(--s-2);
  }
  .section__body,
  .split,
  .mb {
    justify-content: flex-start;
    align-content: start;
  }

  /* nút chính nằm trong sheet, không còn trong nav */
  .nav__cta {
    display: none;
  }

  .grid--cards {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
  .tiles {
    gap: var(--s-4);
  }
  .split {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  /* thẻ nằm ngang: hình bên trái, chữ bên phải */
  .card {
    flex-direction: row;
    gap: var(--s-4);
    align-items: flex-start;
    padding: var(--s-3);
  }
  .card__art {
    flex: 0 0 84px;
    padding: var(--s-2);
  }
  .card__body {
    padding-top: 0;
  }
  .card__tagline {
    margin-top: var(--s-1);
  }
  .card__foot {
    padding-top: var(--s-3);
    flex-wrap: wrap;
  }

  .mb__art {
    display: none;
  }
  .frame svg {
    max-height: 220px;
  }
  .modal {
    padding: var(--s-5);
  }

  /* mọi mục bấm được ngoài đoạn văn phải cao ít nhất 44px */
  .brand {
    min-height: 44px;
  }

  /* nhãn "Chưa có link" dài hơn "Mua": xếp giá và nút
     thành hai hàng để không đẩy thẻ rộng ra ngoài màn hình */
  .card__foot {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-2);
  }
  .card__actions {
    justify-content: space-between;
  }
  .card__buy {
    flex: 1 1 auto;
  }
}

/* Cửa hàng: banner tĩnh, bộ lọc và giỏ hàng. */
.shop-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.shop-categories button {
  min-height: 88px;
  padding: var(--s-3);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.shop-categories button[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--bg);
}
@media (max-width: 640px) {
  .shop-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.nav__search,
.nav__cart,
.nav__account {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.hero__stage {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
  transform: translateY(var(--hero-parallax, 0px));
  transition: transform 160ms linear;
}
.hero__shot {
  position: relative;
  margin: 0;
  padding: var(--s-2);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  box-shadow: 0 8px 24px rgba(36, 41, 74, 0.06);
  transition:
    transform 240ms var(--m-ease),
    box-shadow 240ms var(--m-ease),
    border-color 240ms var(--m-ease);
}
.hero__shot--main {
  grid-row: span 2;
  aspect-ratio: 4 / 3;
}
.hero__shot--sub {
  aspect-ratio: 4 / 3;
}
.hero__shot img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: var(--r-sm);
}
@media (hover: hover) and (pointer: fine) {
  .hero__shot:hover {
    transform: translateY(-4px);
    border-color: rgba(217, 45, 76, 0.32);
    box-shadow: 0 14px 32px rgba(36, 41, 74, 0.12);
  }
}
.grid--cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.shop-filters input,
.shop-filters select,
.shop-dialog input {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit;
}
.shop-clear,
.shop-more,
.shop-dialog button {
  min-height: 44px;
  padding: 8px 14px;
  cursor: pointer;
}
.shop-more {
  margin-top: var(--s-4);
}
.shop-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--ink);
  padding: var(--s-5);
}
.shop-dialog::backdrop {
  background: rgba(17, 22, 48, 0.65);
}
.shop-dialog__head,
.shop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.shop-row input {
  width: 72px;
}
.shop-dialog form,
.shop-dialog form label {
  display: grid;
  gap: var(--s-2);
}
.shop-dialog form {
  gap: var(--s-3);
}
@media (max-width: 1023px) {
  .grid--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav__inner {
    gap: 6px;
  }
  .brand__name {
    font-size: 18px;
  }
  .nav__toggle {
    margin-left: 0;
  }
}
@media (max-width: 640px) {
  .nav {
    height: auto;
    min-height: var(--nav);
  }
  .nav__inner {
    flex-wrap: wrap;
    justify-content: space-between;
    padding-block: 6px;
  }
  .nav__search {
    order: 5;
  }
  .nav__cart,
  .nav__account,
  .nav__search {
    font-size: 13px;
    padding-inline: 8px;
  }
  .hero {
    padding-top: calc(var(--nav) + 60px);
  }
  .hero__stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    height: auto;
  }
  .hero__shot--main {
    grid-column: span 2;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }
  .hero__shot--sub {
    aspect-ratio: 1 / 1;
  }
  .grid--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .grid--cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- 18. Nâng cấp UI/UX: Header Cart Icon, Live Search, Modal Gallery, Cart Stepper & Scroll FX ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav {
  transition:
    background-color 220ms var(--m-ease),
    box-shadow 220ms var(--m-ease),
    backdrop-filter 220ms var(--m-ease);
}

.nav.is-scrolled {
  background: var(--nav-scrolled-bg, rgba(255, 240, 245, 0.86));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(36, 41, 74, 0.08);
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--surface), var(--accent));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.nav__search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav__cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

.nav__cart-icon {
  width: 22px;
  height: 22px;
  transform: translateX(-0.5px);
}

.nav__cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(217, 45, 76, 0.32);
}

.nav__cart-badge[data-empty='true'] {
  background: rgba(36, 41, 74, 0.14);
  color: var(--ink);
  box-shadow: none;
}

.nav__cart-badge.is-pop {
  animation: cartBadgePop 320ms cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes cartBadgePop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.32);
  }
  100% {
    transform: scale(1);
  }
}

/* Card hover ảnh phụ */
.card__art {
  position: relative;
}

.card__img-alt {
  position: absolute;
  inset: var(--s-3);
  width: calc(100% - 2 * var(--s-3)) !important;
  height: calc(100% - 2 * var(--s-3)) !important;
  opacity: 0;
  transition: opacity 280ms var(--m-ease);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover .card__art.has-alt-img .card__img-alt {
    opacity: 1;
  }
}

/* Gallery 1-3 ảnh trong Modal chi tiết */
.modal__gallery {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.modal__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 254, 0.9);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.modal__nav--prev {
  left: 10px;
}

.modal__nav--next {
  right: 10px;
}

.modal__thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
}

.modal__thumb {
  padding: 3px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}

.modal__thumb.is-active {
  border-color: var(--accent);
}

.modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.modal__category {
  display: inline-block;
  margin-top: var(--s-2);
  padding: 2px 10px;
  border-radius: var(--r-btn);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}

/* Modal Giỏ hàng nâng cấp */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.cart-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  margin-bottom: 0;
}

.cart-row__thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg);
  display: grid;
  place-items: center;
}

.cart-row__thumb img,
.cart-row__thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-row__name {
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cart-row__price {
  font-size: 13px;
  color: var(--muted);
}

.cart-row__controls {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.cart-stepper {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--bg);
  overflow: hidden;
}

.shop-dialog .cart-stepper__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.shop-dialog .cart-stepper__btn:hover:not(:disabled) {
  background: rgba(36, 41, 74, 0.06);
}

.shop-dialog .cart-stepper__input {
  width: 42px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  margin: 0;
  border: 0;
  border-inline: 1px solid var(--line);
  border-radius: 0;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 34px;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.shop-dialog .cart-stepper__input::-webkit-inner-spin-button,
.shop-dialog .cart-stepper__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.shop-dialog .cart-row__remove {
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: transparent;
  font-size: 13px;
}

.cart-summary {
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 14px;
  margin-bottom: var(--s-4);
}

.cart-summary--breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.cart-summary__free {
  color: #15803d;
  font-weight: 700;
}

.cart-summary__hint {
  font-size: 12px;
  color: var(--ink);
  opacity: 0.82;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.55);
}

.cart-summary__total {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 16px;
  color: var(--accent);
}

.cart-account-note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--s-2);
}

.shop-submit {
  width: 100%;
  margin-top: var(--s-2);
}

.cart-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-2) var(--s-3);
}

.cart-success__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #dcfce7;
  border: 2px solid #86efac;
  color: #15803d;
  display: grid;
  place-items: center;
}

.cart-success__icon svg {
  width: 28px;
  height: 28px;
}

.cart-success h3,
.cart-success__title {
  color: #15803d;
  font-size: 24px;
  letter-spacing: 0.01em;
}

.cart-success__code-box {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-btn);
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  font-size: 14px;
  color: #166534;
}

.cart-success__code {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.03em;
  color: #14532d;
}

.shop-dialog .cart-success__copy {
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid #86efac;
  border-radius: var(--r-btn);
  background: #ffffff;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.shop-dialog .cart-success__copy:hover {
  background: #dcfce7;
}

.cart-success__desc {
  max-width: 44ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.cart-success__tracker {
  width: 100%;
  text-align: left;
  margin-top: var(--s-1);
}

.cart-success__actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-2);
}

.shop-dialog .cart-success__actions .btn {
  min-height: 44px;
  padding: 0 20px;
  flex: 1 1 180px;
}

@media (max-width: 520px) {
  .cart-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .cart-row__thumb {
    width: 48px;
    height: 48px;
  }
  .cart-row__controls {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
}

/* Live Search Floating Popover */
.live-search {
  position: fixed;
  top: calc(var(--nav) + 8px);
  right: max(var(--gut), calc((100vw - 1280px) / 2));
  z-index: 40;
  width: min(460px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1.5px solid #f2dce1;
  box-shadow: 0 18px 44px rgba(36, 41, 74, 0.16);
  animation: liveSearchIn 160ms var(--m-ease);
}

@keyframes liveSearchIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.live-search[hidden] {
  display: none;
}

.live-search__box {
  width: 100%;
}

.live-search__input-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 2px 10px 2px 14px;
  border: 1.5px solid var(--accent);
  border-radius: var(--r-btn);
  background: var(--bg);
}

.live-search__icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex: 0 0 auto;
}

.live-search__input-row input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}

.live-search__input-row input:focus {
  outline: none;
}

.live-search__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.live-search__close:hover {
  background: rgba(36, 41, 74, 0.08);
  color: var(--ink);
}

.live-search__dropdown {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 6px 4px;
  scrollbar-width: thin;
  scrollbar-color: #e8c4ce transparent;
}

.live-search__section + .live-search__section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.live-search__heading {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
  margin: 0 0 8px;
}

@media (max-width: 640px) {
  .live-search {
    left: 12px;
    right: 12px;
    width: auto;
  }
}

.live-search__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.live-search__chip {
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--bg);
  cursor: pointer;
}

.live-search__chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.live-search__item {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  padding: 8px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.live-search__item:hover {
  background: var(--bg);
}

.live-search__thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  display: grid;
  place-items: center;
}

.live-search__thumb img,
.live-search__thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-search__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.live-search__name mark {
  background: #ffe1ea;
  color: var(--accent);
  padding: 0 2px;
  border-radius: 3px;
}

.live-search__cat {
  font-size: 12px;
  color: var(--muted);
}

.live-search__price {
  font-family: var(--font-display);
  font-size: 15px;
  white-space: nowrap;
}

.live-search__empty {
  color: var(--muted);
  text-align: center;
  padding: var(--s-4);
}

/* Scroll-Reveal Stagger */
.reveal-item {
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition:
    opacity 460ms var(--m-enter) var(--stagger, 0ms),
    transform 520ms var(--m-enter) var(--stagger, 0ms);
}

.reveal-item.is-inview {
  opacity: 1;
  transform: none;
}

/* Back-to-top button */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 25;
  width: 46px;
  height: 46px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(36, 41, 74, 0.16);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    transform 180ms var(--m-ease),
    background-color 180ms var(--m-ease),
    color 180ms var(--m-ease);
}

.back-to-top[hidden] {
  display: none;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .back-to-top:hover {
    background: var(--accent);
    color: var(--on-accent);
    transform: translateY(-2px);
  }
}

/* ---------- 15. Giảm chuyển động ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .m-enter .hero__notice,
  .m-enter .hero__lead,
  .m-enter .hero__actions,
  .m-enter .hero__stage,
  .reveal-item {
    opacity: 1;
    transform: none;
  }
  .m-enter .hero__h1 .line > span {
    transform: none;
  }
  .hero__stage {
    transform: none;
  }

  .btn:hover,
  .card:hover,
  .hero__shot:hover,
  .about .frame:hover {
    transform: none !important;
  }
}

/* ---------- 19. Nâng cấp Thủ công, Bộ lọc Pill, Trạng thái SP & Tài khoản ---------- */

/* Washi Tape on About Frame & Subtle 3D Tilt */
.about .frame {
  position: relative;
  overflow: visible;
  transition:
    transform 240ms var(--m-ease),
    box-shadow 240ms var(--m-ease),
    border-color 240ms var(--m-ease);
}
.frame img {
  width: 100%;
  max-width: 300px;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--r-md);
}
.about .frame::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 22px;
  width: 74px;
  height: 21px;
  border-radius: 3px;
  background: rgba(255, 217, 228, 0.72);
  border-inline: 2px dotted rgba(31, 42, 85, 0.16);
  box-shadow: 0 2px 6px rgba(31, 42, 85, 0.08);
  transform: rotate(-7deg);
  pointer-events: none;
  z-index: 2;
}
.about .frame::before {
  left: 50%;
  margin-left: -42px;
  width: 84px;
  background: rgba(255, 233, 168, 0.76);
  transform: rotate(-4deg);
}
.hero__shot.is-tilting,
.about .frame.is-tilting {
  transition:
    transform 80ms linear,
    box-shadow 240ms var(--m-ease),
    border-color 240ms var(--m-ease);
}
@media (hover: hover) and (pointer: fine) {
  .hero__shot:hover,
  .about .frame:hover {
    transform: perspective(900px) translateY(-4px) rotateX(var(--tilt-x, 0deg))
      rotateY(var(--tilt-y, 0deg));
    border-color: rgba(217, 45, 76, 0.34);
    box-shadow: 0 14px 32px rgba(36, 41, 74, 0.12);
  }
}

/* Sticker Category Cards */
.shop-categories {
  gap: var(--s-3);
}
.shop-categories button.shop-cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 110px;
  padding: var(--s-3) var(--s-2);
  border: 2px dashed rgba(31, 42, 85, 0.22);
  border-radius: 18px;
  background: var(--card);
  box-shadow:
    0 0 0 3px var(--card),
    0 4px 12px rgba(31, 42, 85, 0.06);
  transition:
    transform 180ms var(--m-ease),
    border-color 180ms var(--m-ease),
    background-color 180ms var(--m-ease),
    box-shadow 180ms var(--m-ease);
}
@media (hover: hover) and (pointer: fine) {
  .shop-categories button.shop-cat-card:hover {
    transform: translateY(-3px) rotate(-0.8deg);
    border-color: var(--accent);
    box-shadow:
      0 0 0 3px var(--card),
      0 10px 22px rgba(217, 45, 76, 0.12);
  }
}
.shop-categories button.shop-cat-card[aria-pressed='true'] {
  border-style: solid;
  border-color: var(--accent);
  background: #fff5f8;
  box-shadow:
    0 0 0 3px #ffd9e4,
    0 8px 18px rgba(217, 45, 76, 0.14);
}
.shop-cat__name {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.2;
}
.shop-cat__count {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--r-btn);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}
.shop-categories button.shop-cat-card[aria-pressed='true'] .shop-cat__count {
  background: var(--accent);
  color: var(--on-accent);
}

/* Redesigned Pill Filter Toolbar */
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 10px;
  margin-bottom: var(--s-4);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-btn);
  box-shadow: 0 6px 18px rgba(31, 42, 85, 0.05);
}
.shop-filters__search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  min-height: 44px;
  border-radius: var(--r-btn);
  background: var(--bg);
  border: 1px solid rgba(31, 42, 85, 0.12);
}
.shop-filters__search:focus-within {
  border-color: var(--accent);
}
.shop-filters__icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex: 0 0 auto;
}
.shop-filters__search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.shop-filters__search input:focus {
  outline: none;
}
.shop-filters__select-wrap {
  flex: 0 1 auto;
}
.shop-filters select {
  min-height: 44px;
  padding: 6px 14px;
  border-radius: var(--r-btn);
  background: var(--bg);
  border: 1px solid rgba(31, 42, 85, 0.14);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.shop-filters .shop-clear {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid rgba(217, 45, 76, 0.28);
  border-radius: var(--r-btn);
  background: #fff5f8;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 14px;
  cursor: pointer;
  transition:
    background-color 160ms var(--m-ease),
    border-color 160ms var(--m-ease),
    color 160ms var(--m-ease);
}
@media (hover: hover) and (pointer: fine) {
  .shop-filters .shop-clear:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
  }
}
@media (max-width: 780px) {
  .shop-filters {
    border-radius: var(--r-lg);
    padding: 10px;
  }
  .shop-filters__search {
    flex: 1 1 100%;
  }
  .shop-filters__select-wrap {
    flex: 1 1 calc(50% - 6px);
  }
  .shop-filters select {
    width: 100%;
  }
  .shop-filters .shop-clear {
    margin-left: auto;
  }
}

/* Card Multi-Image & Out-of-Stock Badges */
.card__img-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: var(--r-btn);
  background: rgba(31, 42, 85, 0.78);
  color: #fffdfe;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  pointer-events: none;
}
.card__stock-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: var(--r-btn);
  background: rgba(255, 240, 245, 0.94);
  border: 1px solid rgba(217, 45, 76, 0.35);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
}
.card--out-of-stock .card__art img {
  opacity: 0.72;
}
.btn[disabled],
.card__buy[disabled] {
  background: var(--surface);
  border-color: transparent;
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}
@media (max-width: 640px) {
  .card__img-count,
  .card__stock-badge {
    font-size: 10px;
    padding: 1px 5px;
  }
  .card__img-count {
    right: 5px;
    bottom: 5px;
  }
  .card__stock-badge {
    top: 5px;
    left: 5px;
    max-width: calc(100% - 10px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* About Body line breaks */
[data-setting-about-body] {
  white-space: pre-line;
}

/* Floating Action Stack (Quick Contact Popover + Back to Top) */
.fab-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.fab-stack .back-to-top {
  position: static;
}
.fab-contact-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.fab-contact-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: 248px;
  padding: 10px;
  border-radius: 18px;
  background: var(--card);
  border: 1.5px solid #f2dce1;
  box-shadow: 0 18px 40px rgba(36, 41, 74, 0.18);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform-origin: bottom right;
  animation: fabMenuIn 180ms var(--m-ease);
}
.fab-contact-menu[hidden] {
  display: none;
}
@keyframes fabMenuIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.fab-contact-menu__title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding: 4px 8px 6px;
  border-bottom: 1px dashed var(--line);
}
.fab-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition:
    background-color 160ms var(--m-ease),
    transform 160ms var(--m-ease);
}
.fab-channel[hidden] {
  display: none;
}
.fab-channel:hover {
  background: var(--bg);
  transform: translateX(-2px);
}
.fab-channel__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  color: #ffffff;
}
.fab-channel__icon svg {
  width: 18px;
  height: 18px;
}
.fab-channel--fb .fab-channel__icon {
  background: #1877f2;
}
.fab-channel--ig .fab-channel__icon {
  background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af);
}
.fab-channel--phone .fab-channel__icon {
  background: #16a34a;
}
.fab-channel__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fab-channel__name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.fab-channel__sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fab-contact {
  width: 46px;
  height: 46px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(36, 41, 74, 0.14);
  display: grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms var(--m-ease),
    background-color 180ms var(--m-ease),
    color 180ms var(--m-ease),
    border-color 180ms var(--m-ease);
}
.fab-contact svg {
  width: 20px;
  height: 20px;
}
.fab-contact__icon-close,
.fab-contact.is-open .fab-contact__icon-chat {
  display: none;
}
.fab-contact.is-open .fab-contact__icon-close {
  display: block;
}
.fab-contact.is-open {
  background: var(--ink);
  color: var(--inv-ink);
}
@media (hover: hover) and (pointer: fine) {
  .fab-contact:hover {
    background: var(--ink);
    color: var(--inv-ink);
    transform: translateY(-2px);
  }
}
@media (max-width: 480px) {
  .fab-contact-menu {
    width: min(248px, calc(100vw - 32px));
  }
}

/* Heart & Star Particles + Mini Toast */
.cart-particle {
  position: fixed;
  z-index: 95;
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  transform: translate(-50%, -50%);
  animation: cartParticleFly 720ms var(--m-enter) forwards;
}
@keyframes cartParticleFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(
        calc(-50% + var(--dx, 0px) * 0.3),
        calc(-50% + var(--dy, -20px) * 0.3)
      )
      scale(1.15) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--dx, 0px)),
        calc(-50% + var(--dy, -48px))
      )
      scale(0.75) rotate(var(--rot, 15deg));
  }
}

.toast-stack {
  position: fixed;
  right: 78px;
  bottom: 20px;
  z-index: 75;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: calc(100vw - 98px);
  pointer-events: none;
}
.mini-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-btn);
  background: var(--card);
  border: 1.5px solid var(--accent);
  box-shadow: 0 12px 28px rgba(31, 42, 85, 0.16);
  color: var(--ink);
  font-size: 14px;
  animation: miniToastIn 220ms var(--m-enter);
}
.mini-toast__text {
  line-height: 1.35;
}
.mini-toast__btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: 13px;
  cursor: pointer;
}
.mini-toast__close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
@keyframes miniToastIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 640px) {
  .toast-stack {
    right: 14px;
    left: 14px;
    bottom: 76px;
    max-width: none;
    align-items: stretch;
  }
  .mini-toast {
    justify-content: space-between;
    border-radius: var(--r-md);
  }
}

/* Account Modal: Order History & Order Lookup */
.account-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
}
.account-bar__email {
  font-weight: 700;
  font-size: 14px;
}
.account-bar__actions {
  display: flex;
  gap: var(--s-2);
}
.shop-dialog .account-bar__actions .btn,
.shop-dialog .account-auth-form__actions .btn {
  min-height: 40px;
  padding: 6px 14px;
  font-size: 15px;
}
.account-auth-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.account-section {
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1.5px dashed var(--line);
}
.account-section__title {
  font-size: 18px;
  margin-bottom: var(--s-2);
}
.account-section__hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--s-3);
}
.order-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.order-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.order-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.order-card__code {
  font-family: var(--font-display);
  font-size: 16px;
}
.order-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-btn);
  font-size: 12px;
  font-weight: 700;
}
.order-status-badge.is-pending {
  background: #ffe9a8;
  color: #5c4300;
}
.order-status-badge.is-confirmed {
  background: #dceeff;
  color: #1f2a55;
}
.order-status-badge.is-shipping {
  background: #ffd9e4;
  color: #9c1c36;
}
.order-status-badge.is-completed {
  background: #d8f5d4;
  color: #1e5631;
}
.order-status-badge.is-cancelled {
  background: #f2e4e8;
  color: #7a3241;
}
.order-card__meta {
  font-size: 13px;
  color: var(--muted);
}
.order-card__items {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.order-card__items li {
  display: flex;
  justify-content: space-between;
  gap: var(--s-2);
}
.order-card__totals {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}
.order-card__totals p {
  display: flex;
  justify-content: space-between;
  gap: var(--s-2);
}
.order-card__total-row {
  color: var(--accent);
}
.order-progress {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 6px 0;
}
.order-progress__step {
  text-align: center;
  padding: 6px 4px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.order-progress__step.is-done {
  background: #d8f5d4;
  border-color: #8fcf8a;
  color: #1e5631;
  font-weight: 700;
}
.order-progress__step.is-current {
  background: #ffd9e4;
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.order-progress__cancelled {
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: #f2e4e8;
  color: #7a3241;
  font-size: 13px;
  font-weight: 700;
}
.account-section--standalone {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.recent-orders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--s-3);
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
}
.recent-orders__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  width: 100%;
}
.shop-dialog .recent-order-chip {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid #86efac;
  border-radius: var(--r-btn);
  background: #f0fdf4;
  color: #15803d;
  font-family: var(--font-display);
  font-size: 13px;
  cursor: pointer;
}
.shop-dialog .recent-order-chip:hover {
  background: #dcfce7;
}
.shop-dialog .order-refresh-btn {
  margin-top: var(--s-2);
  min-height: 36px;
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}
.shop-dialog .order-refresh-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lookup-message {
  margin-top: var(--s-2);
  font-size: 13px;
  color: var(--accent);
}
.lookup-result {
  margin-top: var(--s-3);
}

/* Reduced Motion & Tier Min Overrides for New Effects */
.tier-min .cart-particle,
.tier-min .mini-toast,
.tier-min .fab-contact-menu {
  animation: none !important;
}
.tier-min .hero__shot:hover,
.tier-min .about .frame:hover,
.tier-min .shop-categories button.shop-cat-card:hover {
  transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .cart-particle,
  .mini-toast,
  .fab-contact-menu {
    animation: none !important;
  }
  .shop-categories button.shop-cat-card:hover {
    transform: none !important;
  }
}

/* ---------- 20. Nâng cấp Giao diện Mobile-First chuẩn App ---------- */
#san-pham,
#hoi-dap,
#lien-he {
  scroll-margin-top: 72px;
}

.card__art,
.card__name {
  cursor: pointer;
}

.shop-categories button.shop-cat-card--all,
.sheet-handle,
.mobile-tabbar {
  display: none;
}

@media (max-width: 767px) {
  :root {
    --nav: 56px;
    --gut: 14px;
    --padt: 36px;
    --padb: 40px;
  }

  /* 1. Top Bar 1 dòng cố định 56px */
  .nav {
    height: var(--nav);
    min-height: var(--nav);
  }
  .nav__inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    padding-block: 0;
  }
  .brand {
    margin-right: auto;
    gap: 8px;
    min-width: 0;
  }
  .brand__mark svg,
  .brand__mark img {
    width: 32px;
    height: 32px;
  }
  .brand__name {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav__links,
  .nav__toggle,
  .nav__account,
  .nav__search span {
    display: none;
  }
  .nav__search {
    order: 0;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  .nav__cart {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }
  .nav__cart-icon {
    width: 20px;
    height: 20px;
  }
  .nav__cart-badge {
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    line-height: 18px;
  }

  /* 2. Fixed Bottom Tab Bar chuẩn App */
  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--nav-scrolled-bg, rgba(255, 240, 245, 0.94));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(31, 42, 85, 0.08);
  }
  .mobile-tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    transition: color 150ms var(--m-ease);
  }
  .mobile-tabbar__item svg {
    width: 21px;
    height: 21px;
  }
  .mobile-tabbar__item.is-active,
  .mobile-tabbar__item.is-open {
    color: var(--accent);
  }

  /* 3. Chuyển Contact Menu ra dạng thẻ nổi phía trên Bottom Bar, ẩn FAB chat thừa */
  .fab-contact {
    display: none;
  }
  .fab-stack {
    right: 14px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    z-index: 46;
  }
  .back-to-top {
    width: 38px;
    height: 38px;
    border-width: 1.5px;
  }
  .back-to-top svg {
    width: 18px;
    height: 18px;
  }
  .fab-contact-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: 380px;
    margin-inline: auto;
    z-index: 50;
  }

  /* 4. Toast lên sát dưới Top Bar để không che Footer hay Bottom Bar */
  .toast-stack {
    top: calc(var(--nav) + 8px);
    bottom: auto;
    left: 12px;
    right: 12px;
    max-width: none;
    align-items: stretch;
  }

  /* 5. Footer chừa khoảng trống thoáng cho Bottom Bar */
  .closing {
    padding-top: 36px;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 640px) {
  /* Hero gọn, thoáng ngay trong viewport đầu */
  .hero {
    padding-top: calc(var(--nav) + 18px);
    padding-bottom: 24px;
  }
  .hero__h1 {
    font-size: clamp(28px, 8.2vw, 38px);
  }
  .hero__lead {
    margin-top: 8px;
    font-size: 14.5px;
    line-height: 1.5;
  }
  .hero__stage {
    margin-top: 16px;
    gap: 10px;
  }
  .hero__shot {
    padding: 6px;
    border-radius: 16px;
  }

  /* Dải danh mục vuốt ngang 1 hàng nhỏ gọn */
  .shop-categories {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    gap: 8px;
    margin-bottom: 14px;
    padding: 2px 2px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .shop-categories::-webkit-scrollbar {
    display: none;
  }
  .shop-categories button.shop-cat-card,
  .shop-categories button.shop-cat-card--all {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 12px;
    border-width: 1.5px;
    border-style: solid;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(31, 42, 85, 0.05);
    scroll-snap-align: start;
    white-space: nowrap;
  }
  .shop-cat__name {
    font-size: 14px;
  }
  .shop-cat__count {
    font-size: 11px;
    padding: 1px 7px;
  }

  /* Bộ lọc gọn 2 hàng: Hàng 1 tìm kiếm, Hàng 2 sắp xếp + Xóa lọc */
  .shop-filters {
    padding: 8px;
    gap: 8px;
    border-radius: 16px;
    margin-bottom: 12px;
  }
  .shop-filters__search {
    min-height: 40px;
    padding: 0 12px;
  }
  .shop-filters__search input,
  .shop-filters select,
  .shop-dialog input,
  .live-search__input-row input {
    font-size: 16px;
  }
  .shop-filters__search + .shop-filters__select-wrap {
    display: none;
  }
  .shop-filters__select-wrap {
    flex: 1 1 auto;
  }
  .shop-filters select {
    min-height: 40px;
    padding: 6px 12px;
  }
  .shop-filters .shop-clear {
    min-height: 40px;
    padding: 0 14px;
    margin-left: 0;
    font-size: 13px;
  }

  /* Lưới sản phẩm 2 cột dọc chuẩn app mua sắm */
  .grid--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }
  .card {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    border-width: 1.5px;
    border-radius: 16px;
  }
  .card__art {
    flex: none;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 6px;
    border-radius: 12px;
  }
  .card__img-alt {
    inset: 6px;
    width: calc(100% - 12px) !important;
    height: calc(100% - 12px) !important;
  }
  .card__body {
    padding-top: 2px;
    gap: 0;
  }
  .card__name {
    font-size: 16px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card__tagline,
  .card__open {
    display: none;
  }
  .card__foot {
    padding-top: 4px;
    gap: 8px;
  }
  .card__foot-top {
    justify-content: flex-start;
  }
  .card__price {
    font-size: 16px;
    color: var(--accent);
  }
  .card__buy {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13.5px;
  }
  .card__stock-badge {
    top: 6px;
    left: 6px;
    font-size: 10px;
    padding: 2px 7px;
  }
  .card__img-count {
    right: 6px;
    bottom: 6px;
    font-size: 10px;
    padding: 1px 6px;
  }

  /* Bottom Sheet cho Modal Chi tiết Sản phẩm */
  #modal-root {
    align-items: end;
    justify-items: stretch;
    padding: 0;
  }
  .sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 10px;
    border-radius: 999px;
    background: var(--line);
    flex: 0 0 auto;
  }
  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    padding: 12px 16px 0;
    gap: 14px;
    animation: mobileSheetUp 220ms var(--m-enter);
  }
  .modal__close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .modal__gallery {
    width: 100%;
  }
  .modal__art {
    max-width: 100%;
    width: 100%;
    max-height: 320px;
    padding: 10px;
  }
  .modal__name {
    font-size: 24px;
  }
  .modal__price {
    margin-top: 8px;
    font-size: 22px;
    color: var(--accent);
  }
  .modal__desc {
    margin-top: 12px;
  }
  .modal__specs {
    margin-top: 12px;
  }
  .modal__actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 16px -16px 0;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: var(--card);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(31, 42, 85, 0.06);
  }

  /* Bottom Sheet cho Dialog Giỏ hàng / Theo dõi đơn / Tài khoản */
  .shop-dialog {
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border: 0;
    border-radius: 22px 22px 0 0;
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: mobileSheetUp 220ms var(--m-enter);
  }
  .shop-dialog__head {
    margin-bottom: 12px;
  }
  .shop-dialog__head h2 {
    font-size: 24px;
  }
  .shop-dialog [data-shop-close] {
    min-height: 36px;
    padding: 4px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-btn);
    background: var(--card);
    font-size: 14px;
    font-weight: 700;
  }
  .order-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  @keyframes mobileSheetUp {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

.demo-orders__notice {
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}
.demo-orders__statuses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.shop-dialog .demo-orders__status {
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
}
.shop-dialog .demo-orders__status[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.demo-orders__detail {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
}
.demo-orders__item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.demo-orders__item img {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  object-fit: cover;
}
