/* Landfoods – Catalog Quà Tết Đất Linh 2027
   Nguồn CSS. `Nu` = N px theo bề rộng thiết kế 968px, tự co giãn theo khung .page.
   Sinh ra dist/styles.css bằng: python tools/build_site.py */

:root {
  --u: calc(100cqw / 968);
  --red: #fe2400;
  --gold: #e2ad67;
  --ink: #2d1d0e;
  --text: #3b2b1d;
  --brown: #7c4a03;
  --muted: #6b5f52;
  --line: #ecdfc6;
  --display: "Josefin Sans", "Segoe UI", system-ui, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --italic: "Playfair Display", Georgia, serif;
  --gold-text: linear-gradient(180deg, #b4863a 0%, #a57835 30%, #8b6028 62%, #7f5521 85%, #9a6f33 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
/* Safari iOS tự phóng to trang khi ô nhập có chữ < 16px: mọi ô nhập luôn ≥ 16px */
input, select, textarea { font: 400 16px/1.4 var(--serif); }
body { margin: 0; background: #fff; color: var(--text); font-family: var(--serif); font-size: 16px; line-height: 1.5; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
u { text-decoration: none; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Khung trang rộng tối đa 968px, mọi cỡ chữ co giãn theo khung này */
.page { position: relative; width: min(100%, 968px); margin-inline: auto; container-type: inline-size; }

.gold-text { background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* ───────── 1. Bìa ───────── */
/* Video bìa dọc 9:16: trên máy tính co theo chiều cao màn hình, hai bên là nền nâu tối khớp với mép video */
.cover { background: linear-gradient(180deg, #1a1108 0%, #22180d 30%, #261c0d 62%, #1a1108 84%, #000 93%, #000 100%); }
.cover-media { position: relative; width: min(100%, calc(100vh * var(--ar, .5625))); width: min(100%, calc(100svh * var(--ar, .5625))); margin-inline: auto; }
.cover-video { display: block; width: 100%; height: auto; aspect-ratio: var(--ar, .5625); background: #1a1108; pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Ẩn mọi nút/lớp phủ điều khiển gốc của trình duyệt (nút phát lớn của iOS, thanh điều khiển) */
.cover-video::-webkit-media-controls,
.cover-video::-webkit-media-controls-enclosure,
.cover-video::-webkit-media-controls-panel,
.cover-video::-webkit-media-controls-overlay-play-button,
.cover-video::-webkit-media-controls-start-button { display: none !important; -webkit-appearance: none; opacity: 0; }
.cover img { width: 100%; height: auto; }
.cover-ctl { position: absolute; top: 14px; right: 14px; display: none; gap: 8px; }
.js .cover-ctl { display: flex; }
.cv-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1.5px solid rgb(226 173 103 / .8); border-radius: 50%; background: rgb(28 18 9 / .55); color: #f6e0b4; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); -webkit-tap-highlight-color: transparent; }
.cv-btn:hover { background: rgb(28 18 9 / .8); }
.cv-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cv-btn svg { width: 22px; height: 22px; }

/* ───────── 2. Bài thơ ───────── */
.poem { background: var(--red); color: #fff; }
.poem .page { aspect-ratio: 968 / 1368; overflow: hidden; }
.poem-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.poem-eyebrow, .poem-sub, .poem-title, .poem-verse, .poem-motto, .poem-year {
  position: absolute; left: 0; right: 0; text-align: center; font-family: var(--display);
}
.poem-eyebrow { top: calc(86 * var(--u)); font-size: calc(21 * var(--u)); line-height: calc(23 * var(--u)); font-weight: 500; letter-spacing: .42em; padding-left: .42em; text-transform: uppercase; color: #f6b878; }
.poem-sub { top: calc(145.3 * var(--u)); font-size: calc(22 * var(--u)); line-height: calc(24 * var(--u)); font-weight: 700; letter-spacing: .51em; padding-left: .51em; text-transform: uppercase; color: #f8bd7b; }
.poem-title { top: calc(178.7 * var(--u)); padding-top: calc(30 * var(--u)); font-size: calc(76 * var(--u)); line-height: calc(90 * var(--u)); font-weight: 700; letter-spacing: .142em; padding-left: .142em; text-transform: uppercase;
  background: linear-gradient(180deg, #fadca2 0%, #f1c98a 28%, #e3ad60 56%, #cb984b 82%, #dfb269 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.poem-rule { position: absolute; left: 50%; width: calc(262 * var(--u)); transform: translateX(-50%); display: flex; align-items: center; gap: calc(15 * var(--u)); }
.poem-rule i { flex: 1; height: calc(1.6 * var(--u)); background: #e6b068; }
.poem-rule u { width: calc(12.5 * var(--u)); height: calc(12.5 * var(--u)); flex: none; transform: rotate(45deg); background: #e2ad67; }
.rule-top { top: calc(318 * var(--u)); }
.rule-bottom { top: calc(1184 * var(--u)); }
.poem-verse { top: calc(430 * var(--u)); font-size: calc(26 * var(--u)); line-height: calc(40.7 * var(--u)); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.poem-motto { top: calc(1220 * var(--u)); font-size: calc(27 * var(--u)); line-height: calc(30 * var(--u)); font-weight: 400; letter-spacing: .06em; color: #fff; }
.poem-year { top: calc(1268.3 * var(--u)); font-size: calc(23.5 * var(--u)); line-height: calc(28 * var(--u)); font-weight: 400; letter-spacing: .06em; color: #fff; }

/* ───────── 3. Ba phân khúc – lưới set quà ───────── */
.tier { background: #fff; }
.tier-title { padding-top: calc(72 * var(--u)); text-align: center; }
.tier-title h2 { display: inline-block; padding-top: calc(26 * var(--u)); margin-top: calc(-26 * var(--u)); font: 700 calc(58.5 * var(--u))/calc(70 * var(--u)) var(--display); letter-spacing: .078em; padding-left: .078em; text-transform: uppercase;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.tier-block { margin-top: calc(3.5 * var(--u)); text-align: center; }
/* Video lặp (video đầu phân khúc, banner): chưa chạy thì hiện poster */
.lmedia { position: relative; margin: 0; overflow: hidden; background: #1a1108; aspect-ratio: var(--ar, 1.3333); }
.lmedia > img, .lvid { display: block; width: 100%; height: 100%; object-fit: cover; }
.lvid { pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.lvid::-webkit-media-controls, .lvid::-webkit-media-controls-enclosure, .lvid::-webkit-media-controls-panel, .lvid::-webkit-media-controls-overlay-play-button, .lvid::-webkit-media-controls-start-button { display: none !important; -webkit-appearance: none; opacity: 0; }
.lv-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; padding: 0 0 0 4px; border: 2px solid rgb(255 255 255 / .85); border-radius: 50%; background: rgb(26 17 8 / .55); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lv-play svg { display: block; width: 30px; height: 30px; margin: auto; }
.tier-title--video { padding-top: calc(56 * var(--u)); }
.tier-media { width: min(100% - calc(42 * var(--u)), calc(760 * var(--u))); margin-inline: auto; }
.promo { background: var(--red); }
.promo .lmedia { background: var(--red); }
.grid + .tier-block { margin-top: calc(48 * var(--u)); }
.pill { display: inline-block; min-width: calc(257 * var(--u)); height: calc(31.5 * var(--u)); padding-inline: calc(20 * var(--u)); border: 1px solid #bf9244; border-radius: 999px;
  background: linear-gradient(180deg, #f3e5a8 0%, #e9ce89 40%, #dcb468 75%, #cd9f51 100%);
  font: 700 calc(18 * var(--u))/calc(29.5 * var(--u)) var(--display); letter-spacing: .12em; padding-left: calc(20 * var(--u) + .12em); color: #4a2f12; }
.tier-range { margin-top: calc(7 * var(--u)); font: 500 calc(14 * var(--u))/calc(20 * var(--u)) var(--display); letter-spacing: .32em; padding-left: .32em; text-transform: uppercase; color: #8d6d38; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: calc(38 * var(--u)); margin: calc(23 * var(--u)) calc(21 * var(--u)) 0; }
.grid > .card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc((100% - 38 * var(--u)) / 2); }
.card { display: flex; flex-direction: column; padding-bottom: calc(25 * var(--u)); min-width: 0; }
.card-actions { display: none; gap: calc(10 * var(--u)); margin-top: auto; padding-top: calc(14 * var(--u)); }
.js .card-actions { display: flex; }
.btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-height: max(40px, calc(44 * var(--u))); padding: 0 10px; border: 1.5px solid transparent; border-radius: 999px;
  font: 600 max(12.5px, calc(15.5 * var(--u)))/1.15 var(--display); letter-spacing: .02em; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .16s, color .16s, transform .16s; }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.btn-add { background: #fff; border-color: #bf9244; color: #84551a; }
.btn-add:hover { background: #fbf1dc; }
.btn-add.is-added { background: #84551a; border-color: #84551a; color: #fff; }
.btn-buy { background: var(--red); border-color: var(--red); color: #fff; }
.btn-buy:hover { background: #d92000; border-color: #d92000; }
.card-photo img { width: 100%; height: auto; aspect-ratio: 592 / 500; }
/* Ảnh set có nhiều ảnh: vuốt ngang, mỗi lần dừng đúng một ảnh */
.card-photo.has-gallery { position: relative; overflow: hidden; }
.gal-track { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-track:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.gal-track img { flex: 0 0 100%; min-width: 0; object-fit: contain; background: #1a1108; cursor: zoom-in; scroll-snap-align: start; scroll-snap-stop: always; -webkit-user-drag: none; user-select: none; }
.gal-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gal-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgb(255 255 255 / .55); box-shadow: 0 0 0 1px rgb(0 0 0 / .28); transition: width .2s, background .2s; }
.gal-dots i.on { width: 18px; background: #fff; }
.gal-nav { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0 0 3px; border: 0; border-radius: 50%; background: rgb(26 17 8 / .62); color: #fff; font: 400 26px/1 var(--display); cursor: pointer; opacity: 0; transition: opacity .2s; }
.gal-prev { left: 8px; } .gal-next { right: 8px; }
/* Xem ảnh lớn (chạm vào ảnh set): thiệp chúc có chữ nhỏ nên cần phóng to */
.lb { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(12 8 3 / .96); color: #fff; }
.lb::backdrop { background: rgb(0 0 0 / .7); }
.lb-track { position: absolute; inset: 0; display: flex; overflow-x: auto; overscroll-behavior: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-track:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.lb-track img { flex: 0 0 100%; width: 100%; height: 100%; box-sizing: border-box; padding: 64px 12px 48px; object-fit: contain; scroll-snap-align: start; scroll-snap-stop: always; -webkit-user-drag: none; user-select: none; }
.lb-x { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; width: 46px; height: 46px; padding: 0 0 3px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .18); color: #fff; font: 400 32px/1 var(--display); cursor: pointer; }
.lb-count { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); margin: 0; text-align: center; font: 500 14px/1 var(--display); letter-spacing: .1em; color: rgb(255 255 255 / .85); pointer-events: none; }
.lb-nav { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; padding: 0 0 4px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .18); color: #fff; font: 400 32px/1 var(--display); cursor: pointer; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
@media (hover: hover) and (pointer: fine) { .lb-nav { display: grid; place-items: center; } }
@media (hover: hover) and (pointer: fine) { .gal-nav { display: grid; place-items: center; } .card-photo:hover .gal-nav, .gal-nav:focus-visible { opacity: 1; } }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: calc(8 * var(--u)); margin-top: calc(5 * var(--u)); }
.card-name { font: 540 calc(23.9 * var(--u))/calc(28 * var(--u)) var(--display); color: #3a2a1b; }
.card-price { flex: none; font: 600 calc(22.5 * var(--u))/calc(28 * var(--u)) var(--display); color: #84551a; white-space: nowrap; }
.card-benefit { margin-top: calc(-2 * var(--u)); font: italic 500 calc(16.5 * var(--u))/calc(25 * var(--u)) var(--italic); color: #2a1d12; }
.card-ingr { font: 400 calc(14.5 * var(--u))/calc(22 * var(--u)) var(--serif); color: var(--muted); }
.tier { padding-bottom: calc(22 * var(--u)); }

/* ───────── 4. Sản phẩm ───────── */
.sheet { background: #fff; }
.sheet-head { height: calc(109 * var(--u)); padding-top: calc(87 * var(--u)); text-align: center; font: 500 calc(21 * var(--u))/calc(28 * var(--u)) var(--display); letter-spacing: .348em; padding-left: .348em; text-transform: uppercase; color: #a77c3c; }
.sheet-head b { font-weight: 700; color: #6b4316; }
.product { display: grid; grid-template-columns: calc(440 * var(--u)) 1fr; column-gap: calc(11 * var(--u)); align-items: start; margin-inline: calc(28 * var(--u));
  min-height: calc(var(--h) * var(--u)); border-bottom: 1px solid var(--line); }
.product--last { border-bottom: 0; }
.product-media img { width: calc(var(--w) * var(--u)); max-width: none; margin: calc(var(--iy) * var(--u)) 0 0 calc(var(--ix) * var(--u)); }
.product-body { padding-top: calc(var(--ty) * var(--u)); }
.product-kicker { font: 500 calc(15 * var(--u))/calc(18 * var(--u)) var(--display); letter-spacing: .46em; text-transform: uppercase; color: #8a6b3c; }
.product-title { padding-top: calc(14 * var(--u)); margin-top: calc(1.3 * var(--u)); font: 700 calc(51 * var(--u))/calc(56 * var(--u)) var(--display); letter-spacing: -.01em; text-transform: uppercase;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.ornament { position: relative; width: calc(134 * var(--u)); height: calc(8 * var(--u)); margin-top: calc(2 * var(--u));
  background: linear-gradient(#c9a06a, #c9a06a) 0 50% / calc(22 * var(--u)) 1px no-repeat, linear-gradient(#c9a06a, #c9a06a) 100% 50% / calc(96 * var(--u)) 1px no-repeat; }
.ornament::after { content: ""; position: absolute; left: calc(26.5 * var(--u)); top: .25u; width: calc(5.5 * var(--u)); height: calc(5.5 * var(--u)); transform: rotate(45deg); background: #bd8a3f; }
.product-body p:not(.product-kicker) { margin-top: calc(12 * var(--u)); font: 400 calc(20.2 * var(--u))/calc(32 * var(--u)) var(--serif); color: var(--text); }
.product-body .ornament + p { margin-top: calc(18.9 * var(--u)); }
.product-body { padding-right: calc(10 * var(--u)); }
.product-body strong { font-weight: 600; color: #8a5a1c; }

/* ───────── 5. Sáu lý do nên chọn Landfoods ───────── */
.why { background: radial-gradient(ellipse at 50% 30%, #ff3a14 0%, var(--red) 55%, #e51f00 100%); color: #fff; padding-block: calc(80 * var(--u)) calc(90 * var(--u)); }
.why-title { text-align: center; }
.why-eyebrow { display: block; font: 500 calc(19 * var(--u))/calc(26 * var(--u)) var(--display); letter-spacing: .38em; padding-left: .38em; text-transform: uppercase; color: #f8bd7b; }
.why-brand { display: block; padding-top: calc(26 * var(--u)); margin-top: calc(-10 * var(--u)); font: 700 calc(62 * var(--u))/calc(74 * var(--u)) var(--display); letter-spacing: .078em; padding-left: .078em; text-transform: uppercase;
  background: linear-gradient(180deg, #fadca2 0%, #f1c98a 28%, #e3ad60 56%, #cb984b 82%, #dfb269 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.why-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(22 * var(--u)); margin: calc(46 * var(--u)) calc(36 * var(--u)) 0; }
.why-list li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: calc(22 * var(--u)); min-height: calc(118 * var(--u)); padding: calc(24 * var(--u)) calc(28 * var(--u)); border: 1px solid rgb(246 184 120 / .6); border-radius: calc(16 * var(--u)); background: rgb(78 8 0 / .34); }
.why-n { display: grid; place-items: center; width: calc(58 * var(--u)); height: calc(58 * var(--u)); border-radius: 50%; background: linear-gradient(180deg, #f8e0ab, #e2ad67); color: #7a1500; font: 700 calc(26 * var(--u))/1 var(--display); box-shadow: 0 0 0 calc(4 * var(--u)) var(--red), 0 0 0 calc(5.5 * var(--u)) #f1c98a; }
.why-list p { font: 600 calc(22.5 * var(--u))/calc(31 * var(--u)) var(--display); color: #fff; }

/* ───────── 6. Nhận báo giá: May đo set quà theo ngân sách doanh nghiệp ───────── */
.quote { background: #fbf5ea; padding-block: calc(70 * var(--u)) calc(84 * var(--u)); }
.quote-card { margin-inline: calc(36 * var(--u)); padding: calc(46 * var(--u)) calc(44 * var(--u)) calc(50 * var(--u)); border: 1.5px solid #c9a35a; border-radius: calc(30 * var(--u)); background: #fff; box-shadow: 0 2px 16px rgb(124 74 3 / .08); }
.quote-title { padding-top: calc(6 * var(--u)); font: italic 700 calc(46 * var(--u))/calc(56 * var(--u)) var(--italic); color: #8a5a1c; }
.quote-sub { margin-top: calc(12 * var(--u)); font: 400 calc(21 * var(--u))/calc(33 * var(--u)) var(--serif); color: #4a3a2a; }
.quote-group { margin-top: calc(32 * var(--u)); padding-top: calc(30 * var(--u)); border-top: 1px solid #e6d5b0; }
.quote-group h3 { margin-bottom: calc(4 * var(--u)); font: italic 700 calc(34 * var(--u))/calc(42 * var(--u)) var(--italic); color: #8a5a1c; }
.quote-field { display: block; margin-top: calc(16 * var(--u)); }
.quote-field > span { display: block; margin-bottom: calc(7 * var(--u)); font: 500 max(14px, calc(20 * var(--u)))/1.3 var(--display); color: #4a2f12; }
.quote-field b { color: var(--red); }
.quote-field input, .quote-field textarea { width: 100%; padding: 12px 14px; border: 1px solid #d3bd91; border-radius: 12px; background: #fffdf8; color: var(--text); resize: vertical; }
.quote-field input:focus-visible, .quote-field textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: #bf9244; }
.quote-field .is-invalid { border-color: var(--red); background: #fff6f3; }
.qty { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(14 * var(--u)); margin-top: calc(14 * var(--u)); }
.qty label { position: relative; display: block; }
.qty input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.qty label > span { display: grid; place-items: center; min-height: max(48px, calc(58 * var(--u))); padding: 6px 8px; border: 1.5px solid #bf9244; border-radius: 14px; background: #fff; color: #6b4316; font: 500 max(14px, calc(21 * var(--u)))/1.2 var(--display); text-align: center; transition: background .15s, color .15s; }
.qty input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.qty input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.quote-send { display: block; width: 100%; min-height: max(52px, calc(62 * var(--u))); margin-top: calc(30 * var(--u)); border: 0; border-radius: 14px; background: var(--red); color: #fff; cursor: pointer;
  font: 700 max(15px, calc(23 * var(--u)))/1.1 var(--display); letter-spacing: .06em; text-transform: uppercase; transition: background .16s, transform .16s; }
.quote-send:hover:not(:disabled) { background: #d92000; }
.quote-send:active:not(:disabled) { transform: scale(.985); }
.quote-send:disabled { opacity: .6; cursor: default; }
.quote-card .order-error { margin-top: calc(14 * var(--u)); }
.quote-done { margin-top: calc(30 * var(--u)); padding-top: calc(28 * var(--u)); border-top: 1px solid #e6d5b0; }
.quote-done h3 { font: italic 700 calc(36 * var(--u))/calc(46 * var(--u)) var(--italic); color: #8a5a1c; outline: 0; }
.quote-done p { margin-top: calc(12 * var(--u)); font: 400 calc(21 * var(--u))/calc(33 * var(--u)) var(--serif); color: #4a3a2a; }
.quote-done-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(14 * var(--u)); margin-top: calc(26 * var(--u)); }
.quote-done-actions a { display: grid; place-items: center; min-height: max(48px, calc(58 * var(--u))); border-radius: 14px; font: 700 max(14px, calc(21 * var(--u)))/1.2 var(--display); text-align: center; }
.quote-done-actions .zl { background: #0068ff; color: #fff; }
.quote-done-actions .tl { border: 1.5px solid #bf9244; color: #6b4316; }

/* ───────── 7. Trang cuối ───────── */
.closing { background: radial-gradient(ellipse at 50% 68%, #352315 0%, #271910 46%, #1c1209 100%); color: #e6c78c; text-align: center; padding-bottom: 86px; } /* chừa chỗ cho thanh "Nhận catalogue & báo giá" cố định ở đáy */
.closing .page { aspect-ratio: 968 / 1368; }
.closing-logo { position: absolute; left: 50%; top: calc(370 * var(--u)); width: calc(294 * var(--u)); height: auto; transform: translateX(-50%); }
.closing-kicker, .closing-motto, .closing-info, .closing-note { position: absolute; left: 0; right: 0; }
.closing-kicker { top: calc(645.5 * var(--u)); font: 500 calc(20 * var(--u))/calc(26 * var(--u)) var(--display); letter-spacing: .5em; padding-left: .5em; text-transform: uppercase; color: #dcba7e; }
.closing-motto { top: calc(680.5 * var(--u)); font: italic 400 calc(25.5 * var(--u))/calc(41 * var(--u)) var(--italic); color: #ecd5a6; }
.closing-info { top: calc(803 * var(--u)); padding-inline: calc(24 * var(--u)); font-style: normal; }
.closing-company { font: 600 calc(22 * var(--u))/calc(30 * var(--u)) var(--display); letter-spacing: .1em; text-transform: uppercase; color: #ecd5a6; }
.closing-line { margin-top: calc(8 * var(--u)); font: 400 calc(18.5 * var(--u))/calc(28 * var(--u)) var(--serif); color: #cfb27c; }
.closing-line a { font-weight: 600; color: #ecd5a6; }
.closing-url { margin-top: calc(20 * var(--u)); font: 500 calc(22 * var(--u))/calc(30 * var(--u)) var(--display); letter-spacing: .27em; padding-left: .27em; color: #dcba7e; }
.closing-url a { overflow-wrap: anywhere; }
.closing-url.long { font-size: calc(16 * var(--u)); letter-spacing: .1em; padding-left: .1em; } /* link đại lý có mã dài (tối đa 30 ký tự) vẫn nằm gọn trong khung */
.closing-note { top: calc(1297 * var(--u)); font: 400 calc(13 * var(--u))/calc(22 * var(--u)) var(--serif); color: #a98f66; }

/* ───────── Nút liên hệ nổi: Zalo, gọi điện và thanh "Nhận catalogue & báo giá" ───────── */
:root { --bar: 54px; --stack: 78px; } /* --stack = chiều cao thanh đáy + khoảng cách, các nút nổi nằm phía trên */
.zalo, .call { position: fixed; z-index: 20; right: 16px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: #fff;
  box-shadow: 0 6px 18px rgb(0 0 0 / .3); transition: transform .18s, filter .18s; }
.call { bottom: calc(var(--stack) + env(safe-area-inset-bottom, 0px)); background: var(--red); box-shadow: 0 0 0 3px rgb(254 36 0 / .28), 0 6px 18px rgb(0 0 0 / .3); }
.zalo { bottom: calc(var(--stack) + 66px + env(safe-area-inset-bottom, 0px)); background: #0068ff; font: 700 15px/1 var(--display); letter-spacing: .01em; }
.zalo:hover, .call:hover { transform: translateY(-2px); filter: brightness(1.08); }
.zalo:focus-visible, .call:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }
.call svg { flex: none; }
.cta-wrap { position: fixed; z-index: 19; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; padding-inline: 12px; pointer-events: none; transition: transform .25s, opacity .25s; }
.cta-bar { pointer-events: auto; width: min(100%, 560px); min-height: var(--bar); padding: 0 18px; border: 2px solid var(--gold); border-radius: 999px; background: var(--red); color: #fff; cursor: pointer;
  font: 700 16px/1.15 var(--display); letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 8px 22px rgb(0 0 0 / .32); transition: background .16s, transform .16s; }
.cta-bar:hover { background: #d92000; }
.cta-bar:active { transform: scale(.985); }
.cta-bar:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }
.cta-wrap.is-off { transform: translateY(150%); opacity: 0; }
.cta-wrap.is-off .cta-bar { pointer-events: none; }
@media print { .zalo, .call, .cta-wrap, .cart-fab, .toast, .cart, .card-actions { display: none !important; } }

/* ───────── Giỏ hàng ───────── */
[hidden] { display: none !important; }
.cart-fab { position: fixed; z-index: 20; left: 16px; bottom: calc(var(--stack) + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 12px 10px 15px; border: 1.5px solid var(--gold); border-radius: 999px; background: var(--ink); color: #fff; cursor: pointer;
  font: 600 15px/1 var(--display); letter-spacing: .05em; box-shadow: 0 6px 18px rgb(0 0 0 / .3); transition: transform .18s; }
.cart-fab:hover { transform: translateY(-2px); }
.cart-fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }
.cart-fab svg { flex: none; }
.cart-count { display: grid; place-items: center; min-width: 24px; height: 24px; padding-inline: 6px; border-radius: 999px; background: var(--gold); color: var(--ink); font: 700 13px/1 var(--display); }
.cart-count.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.35); } }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--stack) + 14px + env(safe-area-inset-bottom, 0px)); max-width: min(92vw, 420px); padding: 11px 18px; border-radius: 12px;
  background: var(--ink); color: #fff; font: 500 14px/1.4 var(--display); text-align: center; box-shadow: 0 8px 24px rgb(0 0 0 / .35);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Cả hộp thoại tự cuộn (không dùng flex co giãn): Safari iOS xử lý flex-basis 0% sai nên làm khung bị cụt chỉ còn tiêu đề */
.cart { padding: 0; border: 0; border-radius: 16px; width: min(540px, calc(100% - 20px)); max-height: 92vh; max-height: min(92dvh, 880px); background: #fff; color: var(--text); font-family: var(--serif); box-shadow: 0 20px 60px rgb(0 0 0 / .45);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cart::backdrop { background: rgb(28 18 9 / .62); }
body:has(dialog[open]) { overflow: hidden; }
.cart-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 10px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.cart-head h2 { font: 700 18px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #6b4316; }
.cart-head h2:focus { outline: none; }
.cart-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: #6b4316; font: 400 30px/1 var(--display); cursor: pointer; }
.cart-x:hover { background: #f6ecd8; }
.cart-body { padding: 4px 20px max(22px, env(safe-area-inset-bottom, 0px)); }
.cart-empty { padding: 28px 0; text-align: center; color: var(--muted); }
.cart-items li { display: grid; grid-template-columns: 72px 1fr auto; gap: 4px 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-items img { grid-row: 1 / 3; width: 72px; height: auto; aspect-ratio: 592 / 500; object-fit: cover; border-radius: 6px; }
.ci-name { font: 600 16px/1.3 var(--display); color: #33261a; }
.ci-name small { display: block; font: 400 13px/1.3 var(--serif); color: var(--muted); }
.ci-line { font: 650 16px/1.3 var(--display); color: #84551a; white-space: nowrap; }
.ci-ctl { grid-column: 2 / -1; display: flex; align-items: center; gap: 6px; }
.ci-ctl button { width: 36px; height: 36px; border: 1px solid #d3bd91; border-radius: 50%; background: #fff; color: #6b4316; font: 500 20px/1 var(--display); cursor: pointer; }
.ci-ctl button:hover { background: #fbf1dc; }
.ci-ctl output { min-width: 28px; text-align: center; font: 600 16px/1 var(--display); }
.ci-ctl .ci-rm { width: auto; margin-left: auto; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: #a0502a; font: 500 14px/36px var(--display); text-decoration: underline; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 6px; font: 600 16px/1.2 var(--display); text-transform: uppercase; letter-spacing: .06em; color: #4a2f12; }
.cart-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0 0; font: 500 15px/1.3 var(--display); color: #4a2f12; }
.cart-line + .cart-line { padding-top: 4px; }
.cart-disc strong { font: 700 16px/1.3 var(--display); color: var(--red); }
.cart-nudge { margin: 4px 0 6px; padding: 8px 12px; border: 1px solid #ead9b3; border-radius: 8px; background: #fff6e0; color: #7a4a0d; font: 500 13.5px/1.4 var(--display); }
.cart-total strong { font: 700 24px/1.2 var(--display); letter-spacing: 0; text-transform: none; color: var(--red); }
.order { display: grid; gap: 12px; padding-top: 14px; }
.order h3 { font: 700 15px/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #8d6d38; }
.order label { display: grid; gap: 6px; font: 500 14px/1.2 var(--display); color: #4a2f12; }
.order label small { font-size: 13px; font-weight: 400; color: var(--muted); }
.order input, .order textarea { width: 100%; padding: 11px 12px; border: 1px solid #d3bd91; border-radius: 10px; background: #fffdf8; color: var(--text); resize: vertical; }
.order input:focus-visible, .order textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: #bf9244; }
.order .is-invalid { border-color: var(--red); background: #fff6f3; }
.order-error { padding: 9px 12px; border-radius: 8px; background: #fff0eb; color: #b21c00; font: 500 14px/1.4 var(--display); }
.btn-send { flex: none; width: 100%; min-height: 50px; margin-top: 4px; font-size: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.order-hint { font: 400 13px/1.45 var(--serif); color: var(--muted); text-align: center; }
.link-btn { justify-self: center; margin: 4px auto 0; padding: 8px 10px; border: 0; background: none; color: #84551a; font: 500 14px/1.2 var(--display); text-decoration: underline; cursor: pointer; }
.done-title { padding-top: 18px; font: 700 20px/1.3 var(--display); color: #6b4316; }
.done-msg { margin-top: 6px; font: 400 15px/1.5 var(--serif); color: var(--text); }
.order-text { width: 100%; margin-top: 12px; padding: 12px; border: 1px solid #d3bd91; border-radius: 10px; background: #fffdf8; color: var(--text); line-height: 1.5; resize: none; }
.done-actions { display: grid; gap: 10px; margin-top: 12px; }
.done-actions .btn { flex: none; min-height: 48px; font-size: 15px; }
.done-actions [hidden] { display: none; }
.done-actions .btn[disabled] { opacity: .75; cursor: default; }
.done-err { margin: 10px 0 0; color: #b3261e; font-size: 14px; line-height: 1.4; }

/* Thanh toán: chọn hình thức trong form + thông tin chuyển khoản sau khi đặt hàng */
.pay { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pay-title { padding: 0; font: 700 15px/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #8d6d38; }
.order .pay-opt { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid #d3bd91; border-radius: 10px; background: #fffdf8; cursor: pointer; }
.order .pay-opt input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0; accent-color: var(--red); }
.order .pay-opt:has(input:checked) { border-color: var(--red); background: #fff6f3; box-shadow: 0 0 0 1px var(--red); }
.order .pay-opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.pay-opt span, .pay-fixed { display: grid; gap: 3px; min-width: 0; }
.pay-opt b, .pay-fixed b { font: 600 15px/1.25 var(--display); color: #4a2f12; }
.pay-opt small, .pay-fixed small { font: 400 13px/1.4 var(--serif); color: var(--muted); }
.pay-fixed { padding: 11px 12px; border: 1px solid #d3bd91; border-radius: 10px; background: #fffdf8; }
.pay-info { margin-top: 14px; padding: 14px; border: 1.5px solid var(--gold); border-radius: 12px; background: #fffaf0; }
.pay-info h3 { font: 700 15px/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #8d6d38; }
.pay-dl { display: grid; gap: 4px 0; margin: 10px 0 0; }
.pay-dl dt { margin-top: 8px; font: 500 13px/1.2 var(--display); color: var(--muted); }
.pay-dl dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.pay-val { min-width: 0; font: 700 17px/1.3 var(--display); color: #3a2208; overflow-wrap: anywhere; user-select: all; }
.pay-copy { flex: none; min-height: 36px; padding: 0 12px; border: 1px solid var(--gold); border-radius: 999px; background: #fff; color: #7a4a0d; font: 600 13px/1 var(--display); cursor: pointer; }
.pay-qr { display: block; width: min(240px, 100%); height: auto; margin: 14px auto 0; border: 1px solid #ead9b3; border-radius: 10px; background: #fff; }
.pay-note { margin-top: 12px; font: 400 14px/1.5 var(--serif); color: var(--text); }
.pay-qr[hidden], .pay-info[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .gal-dots i, .gal-nav { transition: none; } .btn, .toast, .cart-fab, .cta-wrap, .cta-bar, .zalo, .call, .quote-send { transition: none; } .cart-count.bump { animation: none; } }

/* ───────── Màn hình nhỏ ───────── */
@media (max-width: 639px) {
  :root { --u: calc(100cqw / 440); }
  :root { --bar: 50px; --stack: 74px; }
  .zalo, .call { right: 12px; width: 52px; height: 52px; }
  .zalo { bottom: calc(var(--stack) + 62px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
  .cart-fab { left: 12px; padding: 9px 10px 9px 12px; font-size: 14px; }
  .cta-bar { font-size: 14.5px; letter-spacing: .03em; }
  .quote { padding-block: 40px 44px; }
  .quote-card { margin-inline: 12px; padding: 22px 16px 24px; border-radius: 18px; }
  .quote-title { padding-top: 0; font-size: 25px; line-height: 32px; }
  .quote-sub { margin-top: 8px; font-size: 15px; line-height: 23px; }
  .quote-group { margin-top: 20px; padding-top: 18px; }
  .quote-group h3 { font-size: 21px; line-height: 28px; }
  .quote-field { margin-top: 12px; }
  .qty { gap: 8px; margin-top: 10px; }
  .qty label > span { min-height: 46px; font-size: 14px; }
  .quote-send { min-height: 52px; margin-top: 22px; font-size: 15px; }
  .quote-done h3 { font-size: 24px; line-height: 31px; }
  .quote-done p { font-size: 15px; line-height: 23px; }
  .quote-done-actions { grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
  .cart { width: 100%; max-width: 100%; max-height: 94vh; max-height: 94dvh; margin: auto auto 0; border-radius: 16px 16px 0 0; }
  .card-actions { flex-direction: column; gap: 6px; padding-top: 10px; }
  .card-actions .btn { flex: none; min-height: 38px; font-size: 12.5px; padding-inline: 6px; }
  .poem .page { --u: calc(100cqw / 850); aspect-ratio: 850 / 1368; }
  .closing .page { --u: calc(100cqw / 520); aspect-ratio: 520 / 820; }
  .closing-logo { top: calc(130 * var(--u)); }
  .closing-kicker { top: calc(400 * var(--u)); }
  .closing-motto { top: calc(440 * var(--u)); }
  .closing-info { top: calc(560 * var(--u)); }
  .why { padding-block: 44px 48px; }
  .why-eyebrow { font-size: 12px; line-height: 18px; }
  .why-brand { padding-top: 16px; margin-top: -6px; font-size: 38px; line-height: 46px; }
  .why-list { gap: 10px; margin: 24px 12px 0; }
  .why-list li { grid-template-columns: 1fr; justify-items: center; align-content: start; gap: 12px; min-height: 0; padding: 18px 12px 18px; border-radius: 14px; text-align: center; }
  .why-n { width: 38px; height: 38px; font-size: 17px; box-shadow: 0 0 0 3px var(--red), 0 0 0 4.5px #f1c98a; }
  .why-list p { font-size: 14.5px; line-height: 21px; }
  .closing-note { top: calc(770 * var(--u)); font-size: 12px; padding-inline: 16px; }
  .tier-range { font-size: 11.5px; letter-spacing: .16em; padding-left: .16em; }
  .grid { column-gap: 10px; margin-inline: 12px; }
  .grid > .card:last-child:nth-child(odd) { width: calc((100% - 10px) / 2); }
  .card { padding-bottom: 20px; }
  .card-head { display: block; margin-top: 6px; }
  .card-name, .card-price { font-size: 13.5px; line-height: 18px; }
  .card-benefit { margin-top: 2px; font-size: 11.5px; line-height: 16px; }
  .card-ingr { margin-top: 2px; font-size: 11px; line-height: 15px; }
  /* Trang sản phẩm: 2 sản phẩm mỗi hàng, hình trên – chữ dưới */
  .sheet .page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; padding-inline: 12px; }
  .sheet-head { grid-column: 1 / -1; height: auto; padding: 36px 4px 6px; font-size: 12px; line-height: 20px; }
  /* Sản phẩm đứng một mình ở cuối: chiếm cả hàng, hình giữa – chữ rộng, chữ to hơn */
  .sheet .page > .product:nth-child(2):last-child { grid-column: 1 / -1; padding-inline: 4px; border-bottom: 0; }
  .sheet .page > .product:nth-child(2):last-child .product-media { width: min(64%, 250px); justify-self: center; }
  .sheet .page > .product:nth-child(2):last-child .product-kicker { font-size: 10.5px; line-height: 16px; }
  .sheet .page > .product:nth-child(2):last-child .product-title { font-size: 30px; line-height: 34px; }
  .sheet .page > .product:nth-child(2):last-child .product-body p:not(.product-kicker) { margin-top: 10px; font-size: 14px; line-height: 22px; }
  .sheet .page > .product:nth-child(2):last-child .ornament + p { margin-top: 12px; }
  .product, .product--last { grid-template-columns: 1fr; align-content: start; min-width: 0; margin-inline: 0; min-height: 0; padding-block: 18px 28px; row-gap: 10px; border-bottom: 1px solid var(--line); }
  /* Mọi hình nằm trong khung vuông bằng nhau (chai cao hay hộp vuông đều cân), nên chữ hai cột luôn bắt đầu ngang hàng */
  .product-media { aspect-ratio: 1 / 1; }
  .product-media img { width: 100%; height: 100%; margin: 0; object-fit: contain; object-position: 50% 60%; }
  .product-body { padding: 0; }
  .product-kicker { font-size: 9px; line-height: 14px; letter-spacing: .2em; }
  .product-title { padding-top: 10px; margin-top: 0; font-size: 22px; line-height: 26px; }
  .ornament { margin-top: 2px; }
  .product-body p:not(.product-kicker) { margin-top: 8px; font-size: 12px; line-height: 18px; }
  .product-body .ornament + p { margin-top: 10px; }
}
