@charset "UTF-8";
/* ==========================================================================
   NÔNG SỚM — nông sản & trái cây tươi từ vườn
   Art direction: giấy kem ấm, mực ô-liu, đất nung. Serif Fraunces là giọng nói
   của vườn; bố cục lệch trục, viền mảnh thay đổ bóng, khoảng trắng rộng.

   Luật chuyển động của bộ template này:
   - Chỉ animate transform + opacity (giữ 60fps, không layout thrash).
   - Đúng 3 đường cong easing dùng chung toàn site (token ở :root).
   - Đúng 2 chế độ reveal: fade-up (.reveal) và line mask (.line-reveal).
   - Không preloader, không toast, không marquee, không countdown.
   - prefers-reduced-motion tắt sạch, nội dung hiện ngay ở trạng thái cuối.

   01 Token & nền tảng     06 Sản phẩm & lưới      11 Giỏ hàng
   02 Chữ                  07 Quy trình & vùng     12 Biểu mẫu
   03 Nút & huy hiệu       08 Lời kể & nhật ký     13 Trang pháp lý
   04 Header & footer      09 Trang cửa hàng       14 GDPR & tiện ích
   05 Hero & dải USP       10 Trang sản phẩm       15 Chuyển động & a11y
   ========================================================================== */

/* ============================ 01 TOKEN & NỀN TẢNG ======================== */
:root {
  /* Hai màu đất nằm ngoài thang Radix — dành riêng cho giá, huy hiệu, nền giấy.
     Thực phẩm cần hơi ấm mà thang ô-liu không có sẵn. */
  --terra: #b4552b;
  --terra-deep: #8f3e1e;
  --cream: #fbf7ef;
  --cream-deep: #f4eee1;

  --ink: var(--accent-12);
  --ink-soft: var(--accent-11);
  --line: color-mix(in srgb, var(--accent-9) 18%, transparent);
  --line-strong: color-mix(in srgb, var(--accent-9) 34%, transparent);

  --shell: min(1240px, 100% - 2.5rem);
  --shell-narrow: min(760px, 100% - 2.5rem);

  --step-0: clamp(0.95rem, 0.92rem + 0.16vw, 1.03rem);
  --step-1: clamp(1.06rem, 1rem + 0.3vw, 1.22rem);
  --step-2: clamp(1.3rem, 1.18rem + 0.6vw, 1.65rem);
  --step-3: clamp(1.6rem, 1.36rem + 1.15vw, 2.35rem);
  --step-4: clamp(2rem, 1.55rem + 2.1vw, 3.4rem);
  --step-5: clamp(2.5rem, 1.7rem + 3.7vw, 5rem);

  /* Nhịp dọc: 64px mobile → 128px desktop */
  --sp-sec: clamp(4rem, 2.4rem + 6.4vw, 8rem);

  --r: 6px;
  --r-lg: 14px;
  --r-shell: 2rem;

  /* Chuyển động — đúng 3 đường cong, dùng chung mọi nơi */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-reveal: cubic-bezier(0.215, 0.61, 0.355, 1);
  --dur-hover: 200ms;
  --dur-ui: 280ms;
  --dur-enter: 700ms;
  --dur-reveal: 900ms;
  --ladder: 90ms; /* bậc thang delay cho lưới/card */
}

*, *::before, *::after { box-sizing: border-box; }

/* Thuộc tính hidden phải thắng mọi display của component — bộ lọc dựa vào nó */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--accent-11); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-12); }

button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: var(--shell); margin-inline: auto; }
.wrap-narrow { width: var(--shell-narrow); margin-inline: auto; }

.sec { padding-block: var(--sp-sec); position: relative; }
.sec--tight { padding-block: clamp(2.6rem, 1.9rem + 3vw, 4.5rem); }
/* Hai khối liền nhau cùng màu nền không có ranh giới thị giác nào, nên hai
   lớp padding cộng dồn thành khoảng trống 200px+. Khối sau chỉ lấy nửa nhịp. */
.s-cream + .sec.s-cream,
.s-tint + .sec.s-tint,
.s-leaf + .sec.s-leaf,
.s-ink + .sec.s-ink { padding-top: calc(var(--sp-sec) * 0.5); }
.s-cream + .sec.sec--tight.s-cream,
.s-tint + .sec.sec--tight.s-tint { padding-top: clamp(1.3rem, 0.95rem + 1.5vw, 2.25rem); }
.s-cream { background: var(--cream); }
.s-tint { background: var(--accent-1); }
.s-leaf { background: var(--accent-3); }
.s-ink { background: var(--accent-12); color: var(--accent-2); }
.s-ink a { color: var(--accent-8); }
.s-ink .muted, .s-ink .lead { color: var(--accent-6); }

.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;
}

/* ================================ 02 CHỮ ================================= */
h1, h2, h3, h4, .d1, .d2, .d3, .d4 {
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-variation-settings: "SOFT" 0, "WONK" 1;
  text-wrap: balance;
}

.d1 { font-size: var(--step-5); }
.d2 { font-size: var(--step-4); }
.d3 { font-size: var(--step-3); }
.d4 { font-size: var(--step-2); line-height: 1.2; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 58ch;
}

.tagline {
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.35;
  color: var(--accent-11);
  letter-spacing: -0.01em;
}

/* Eyebrow: chấm + nhãn chữ hoa giãn — dấu nhận diện lặp ở mọi section */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-11);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 0.375rem; height: 0.375rem;
  border-radius: 999px;
  background: var(--terra);
  flex: none;
}
.s-ink .eyebrow { color: var(--accent-8); }

/* Không để dòng cuối mồ côi một từ */
p, .muted, .lead, .region-card p, .pcard__unit, .post-card p { text-wrap: pretty; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.84rem; line-height: 1.55; }

/* Đường "giờ sáng" — chi tiết nhận diện, chia phần thay vì gạch ngang trơn */
.dawn-rule {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 2.2rem;
  color: var(--accent-11);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
.dawn-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line-strong), transparent);
}

/* Chữ khổng lồ chìm dưới nền — lớp giấy, không phải trang trí ồn */
.watermark {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: clamp(4.5rem, 13vw, 13rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: color-mix(in srgb, var(--ink) 5%, transparent);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.s-ink .watermark, .site-footer .watermark {
  color: color-mix(in srgb, #ffffff 6%, transparent);
}
/* Watermark chạy sau chữ chức năng — hạ tương phản để không nuốt link/nút */
.site-footer .ft-watermark { color: color-mix(in srgb, #ffffff 4%, transparent); }
.hero__watermark { color: color-mix(in srgb, var(--ink) 3.5%, transparent); }

/* ============================ 03 NÚT & HUY HIỆU ========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out),
              transform var(--dur-hover) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.btn-primary { background: var(--accent-9); color: #fff; }
.btn-primary:hover { background: var(--accent-10); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--accent-11);
  border-color: var(--line-strong);
}
.btn-outline:hover { background: var(--accent-3); color: var(--accent-12); border-color: var(--accent-8); }

.btn-terra { background: var(--terra); color: #fff; }
.btn-terra:hover { background: var(--terra-deep); color: #fff; }

.btn-ghost { background: transparent; color: var(--accent-11); padding-inline: 0.4rem; }
.btn-ghost:hover { color: var(--accent-12); }

.btn-sm { min-height: 44px; padding: 0.6rem 1.05rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

.s-ink .btn-outline { color: var(--accent-8); border-color: var(--accent-a7); }
.s-ink .btn-outline:hover { background: var(--accent-a4); color: #fff; }

/* Nút phụ trên nền mực: accent-11 chỉ đạt 2,50:1 nên dùng nền kem (12,56:1)
   kèm gạch chân để lựa chọn "chỉ phần cần thiết" không yếu thế hơn "đồng ý". */
.gdpr-banner .btn-outline {
  color: var(--cream);
  border-color: color-mix(in srgb, var(--cream) 45%, transparent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gdpr-banner .btn-outline:hover {
  background: color-mix(in srgb, var(--cream) 14%, transparent);
  color: var(--cream);
  border-color: var(--cream);
}

/* Thêm giỏ báo trạng thái ngay trên chính nút — thay cho toast */
.btn[data-added="true"] { background: var(--accent-10); color: #fff; border-color: var(--accent-10); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-season { background: var(--accent-9); color: #fff; }
.badge-fresh { background: var(--terra); color: #fff; }
.badge-low { background: var(--cream); color: var(--terra-deep); border: 1px solid var(--terra); }
.badge-sale { background: var(--terra); color: #fff; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* ============================ 04 HEADER & FOOTER ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.hd-inner {
  width: var(--shell);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.logo svg { width: 27px; height: 27px; flex: none; }
.logo small {
  display: block;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent-11);
  margin-top: 2px;
}

.nav { display: none; gap: 1.35rem; }
.nav a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding-block: 0.45rem;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent-9);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-ui) var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--accent-11); }

.hd-actions { display: flex; align-items: center; gap: 0.55rem; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out);
}
.icon-btn:hover { background: var(--accent-3); border-color: var(--accent-8); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.cart-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--terra);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}
.cart-badge[data-empty="true"] { display: none; }
.cart-badge.is-bump { animation: badge-bump 420ms var(--ease-out); }

@keyframes badge-bump {
  0% { transform: scale(1); }
  38% { transform: scale(1.32); }
  100% { transform: scale(1); }
}

.burger {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.burger span, .burger span::before, .burger span::after {
  content: "";
  display: block;
  width: 18px; height: 1.5px;
  background: var(--ink);
  transition: transform var(--dur-ui) var(--ease-out), opacity var(--dur-hover) var(--ease-out);
}
.burger span::before { transform: translateY(-6px); }
.burger span::after { transform: translateY(4.5px); }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: rotate(-45deg) translateY(0); }

.mobile-panel {
  position: fixed;
  inset: 68px 0 auto;
  z-index: 290;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 1.2rem 1.25rem 1.8rem;
  display: none;
}
.mobile-panel[data-open="true"] { display: block; }
.mobile-panel a {
  display: block;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.18rem;
}
.mobile-panel .btn { margin-top: 1.2rem; }

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--accent-12);
  color: var(--accent-4);
  border-radius: var(--r-shell) var(--r-shell) 0 0;
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) 2rem;
}
.site-footer a { color: var(--accent-6); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.ft-grid {
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid var(--accent-a5);
}
.ft-brand .logo { color: var(--accent-2); }
.ft-brand .logo small { color: var(--accent-7); }
/* Thụt bằng đúng bề rộng icon lá + gap để đoạn mô tả thẳng lề với wordmark */
.ft-brand p { color: var(--accent-6); font-size: 0.9rem; max-width: 34ch; padding-left: calc(27px + 0.55rem); }
.ft-col h3 {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-8);
  margin-bottom: 0.9rem;
}
.ft-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; font-size: 0.9rem; }
/* Đích bấm tối thiểu 24px theo WCAG 2.5.8 — chữ 0,9rem chỉ cao 17–21px. */
.ft-col ul a, .ft-col ul li > a { display: inline-flex; align-items: center; min-height: 24px; }
.ft-bottom {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--accent-7);
}
.ft-watermark {
  position: absolute;
  left: 50%;
  bottom: -0.35em;
  transform: translateX(-50%);
  z-index: 0;
}
.site-footer .wrap { position: relative; z-index: 1; }

/* ============================ 05 HERO & DẢI USP ========================== */
.hero {
  position: relative;
  background: var(--accent-1);
  border-radius: 0 0 var(--r-shell) var(--r-shell);
  padding-top: clamp(2.2rem, 1.2rem + 3vw, 3.8rem);
  padding-bottom: clamp(3rem, 2rem + 4vw, 5rem);
  overflow: hidden;
}
.hero__watermark {
  position: absolute;
  left: 0.5rem;
  bottom: -0.28em;
  font-size: clamp(3rem, 8.5vw, 8.5rem);
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero__grid {
  display: grid;
  gap: clamp(2.2rem, 1rem + 4vw, 3rem);
  align-items: center;
}
.hero__text { max-width: 34rem; }
.hero__text h1 { margin-bottom: 0.75rem; }
.hero__text .tagline { margin: 0 0 1.15rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.9rem; }

.hero__clock {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 0.9rem;
  color: var(--accent-11);
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  margin-bottom: 1.4rem;
}
.hero__clock b { font-weight: 600; color: var(--ink); }

.hero__media { position: relative; }
.hero__frame {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--accent-3);
}
.hero__frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* Ảnh phóng sẵn 1.15 để JS dịch dọc mà không lộ mép */
  transform: scale(1.15) translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.hero__inset {
  position: absolute;
  left: -6%;
  bottom: -1.5rem;
  width: 40%;
  max-width: 190px;
  border: 8px solid var(--accent-1);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.hero__inset img { aspect-ratio: 1; object-fit: cover; width: 100%; }

/* Dải USP: 5 ô cam kết. Bo góc thẻ (không phải viên thuốc) để chữ căn trái
   không lọt vào vùng cong, và mọi ô cùng viền trong suốt để không lệch 1px. */
.usp-band { padding-block: clamp(1.6rem, 1.2rem + 2vw, 2.6rem); }
.usp-band ul {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.usp-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 500;
}
/* Icon SVG stroke currentColor: tự đổi màu theo nền (kem / ô-liu / mực / đất
   nung) và cùng một khung vuông nên 5 ô luôn thẳng hàng. */
.usp-pill .u-ico {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}
.usp-pill .u-ico svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.usp-pill--light { background: var(--accent-3); color: var(--accent-12); }
.usp-pill--accent { background: var(--accent-9); color: #fff; }
.usp-pill--dark { background: var(--accent-12); color: var(--accent-3); }
.usp-pill--ghost { background: var(--accent-3); color: var(--accent-12); }
.usp-pill--terra { background: var(--terra); color: #fff; }

/* ============================ 06 SẢN PHẨM & LƯỚI ========================= */
.sec-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.6rem;
}
.sec-head p { max-width: 54ch; }
.sec-head__link { margin: 0; }

.grid-products {
  display: grid;
  gap: 1.5rem 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.pcard { display: flex; flex-direction: column; }
.pcard__media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--accent-3);
}
.pcard__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 550ms var(--ease-out);
}
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__flags {
  position: absolute;
  top: 0.6rem; left: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.pcard__body { padding-top: 0.85rem; display: flex; flex-direction: column; gap: 0.28rem; flex: 1; }
.pcard__name {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}
.pcard__name a { color: var(--ink); text-decoration: none; }
.pcard__name a:hover { color: var(--accent-11); }
.pcard__unit { font-size: 0.8rem; color: var(--ink-soft); }
.pcard__price {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--terra-deep);
  margin-top: auto;
  padding-top: 0.45rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.pcard__price del {
  font-size: 0.85rem;
  color: var(--gray-11);
  font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 400;
  opacity: 0.65;
  text-decoration-thickness: 1px;
}
.fill-row__price del {
  font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--gray-11);
  opacity: 0.65;
  text-decoration-thickness: 1px;
  margin-left: 0.15rem;
}
.pcard__add { margin-top: 0.7rem; }
/* Trên nền kem, viền --line-strong vẫn đọc như nút disabled */
.pcard__add.btn-outline { border-color: var(--accent-8); color: var(--accent-12); }
.pcard__add.btn-outline:hover { border-color: var(--accent-9); }

.cat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.cat-card {
  position: relative;
  display: block;
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
}
.cat-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
.cat-card:hover img { transform: scale(1.05); }
.cat-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 26, 16, 0.78) 0%, rgba(20, 26, 16, 0.35) 45%, transparent 75%);
}
.cat-card__label { position: absolute; left: 1rem; right: 1rem; bottom: 0.95rem; z-index: 1; }
.cat-card__label strong {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: #fff;
}
.cat-card__label span { font-size: 0.78rem; color: var(--accent-6); }

/* Vòng mùa — 12 chip tháng, cuộn ngang trên mobile */
.season-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.7rem;
  padding-inline-end: 1.25rem;
  margin-bottom: 1.8rem;
  scrollbar-width: thin;
  /* Tín hiệu "còn cuộn được": mờ dần mép phải + điểm dừng cho từng chip */
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
  mask-image: linear-gradient(to right, #000 85%, transparent);
}
.season-chip { scroll-snap-align: start; }
.season-chip {
  flex: none;
  min-height: 44px;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out),
              transform var(--dur-hover) var(--ease-out);
}
.season-chip:hover { border-color: var(--accent-8); color: var(--ink); transform: translateY(-1px); }
.season-chip[aria-pressed="true"] { background: var(--accent-9); border-color: var(--accent-9); color: #fff; }
.season-chip[data-now="true"]::after { content: "•"; color: var(--terra); margin-left: 0.35rem; }
.season-chip[aria-pressed="true"][data-now="true"]::after { color: var(--accent-6); }

.empty-note {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}

/* ============================ 07 QUY TRÌNH & VÙNG ======================== */
.steps { display: grid; gap: 1.6rem; }
.step {
  display: grid;
  /* Cột số rộng cố định — "01" và "04" không cùng bề rộng nên `auto` làm
     cột chữ của 4 bước lệch nhau vài pixel. */
  grid-template-columns: 3.5rem 1fr;
  gap: 1.1rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
  align-self: start;
}
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step__n {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.6rem, 2rem + 2.4vw, 4rem);
  font-weight: 500;
  line-height: 0.85;
  color: var(--accent-11);
  font-variant-numeric: tabular-nums lining-nums;
}
.step h3 { font-size: var(--step-2); margin-bottom: 0.35rem; }
.step__time {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra-deep);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.region-grid { display: grid; gap: 1rem; }
.region-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-ui) var(--ease-out);
}
.region-card:hover { transform: translateY(-3px); }
.region-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.region-card__body { padding: 1.5rem; display: grid; gap: 0.75rem; }
.region-card h3 { font-size: var(--step-2); margin: 0; }
.region-card__meta {
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-11);
  font-weight: 600;
}
/* Marker tự vẽ để chữ bullet về đúng lề trái của tiêu đề, không thụt 17px */
.region-card ul { margin: 0; padding-left: 0; list-style: none; font-size: 0.86rem; color: var(--ink-soft); }
.region-card ul li { position: relative; padding-left: 0.95rem; }
.region-card ul li::before {
  content: "\00b7";
  position: absolute;
  left: 0.1rem;
  font-weight: 700;
  color: var(--accent-9);
}

/* Bảng số liệu trên tấm nền đậm bo tròn */
.stats-panel {
  background: var(--accent-12);
  color: var(--accent-3);
  border-radius: var(--r-shell);
  padding: clamp(2rem, 1.4rem + 3vw, 3.4rem);
}
/* Tấm số liệu dán sát lưới vùng trồng nếu không tự chừa nhịp riêng */
.region-grid + .stats-panel, .steps + .stats-panel { margin-top: 3.5rem; }
.stat-row { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.stat b {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  color: var(--accent-8);
  font-variant-numeric: tabular-nums lining-nums;
}
/* Chỉ nhắm span nhãn (con trực tiếp) — span đếm số nằm trong <b> phải giữ
   nguyên cỡ chữ hiển thị lớn của <b>. */
.stat > span { display: block; font-size: 0.85rem; line-height: 1.4; color: var(--accent-6); }

/* Hàng hover-fill — dùng cho combo tuần và bảng giá */
.fill-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.fill-row {
  display: grid;
  /* Dưới 600px giá xuống dòng riêng — ở 320px ba cột không đủ chỗ */
  grid-template-columns: 2.75rem 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1.3rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color var(--dur-ui) var(--ease-out);
}
/* Dịch nội dung bằng transform — animate padding gây reflow mỗi khung hình. */
.fill-row > * { transition: transform var(--dur-ui) var(--ease-out); }
.fill-row:hover { background: var(--accent-2); color: inherit; }
.fill-row:hover > * { transform: translateX(0.6rem); }
.fill-row__n {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent-11);
  line-height: 1;
  align-self: start;
  margin-top: 0.15em;
  font-variant-numeric: tabular-nums lining-nums;
}
.fill-row h3 { margin: 0 0 0.15rem; font-size: var(--step-2); }
.fill-row p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }
.fill-row__end { display: flex; align-items: center; gap: 0.6rem; grid-column: 2; }
/* Mũi tên luôn dính mép phải — hàng có giá gạch dài hơn sẽ không đẩy nó lệch */
.fill-row__arrow { margin-left: auto; }
.fill-list > li:last-child .fill-row { border-bottom: 0; }
.fill-row__price {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--terra-deep);
  white-space: nowrap;
}
.fill-row__arrow {
  width: 20px; height: 20px;
  stroke: var(--accent-11);
  fill: none;
  stroke-width: 1.6;
  transition: transform var(--dur-ui) var(--ease-out);
}
.fill-row:hover .fill-row__arrow { transform: translateX(3px); }

/* ============================ 08 LỜI KỂ & NHẬT KÝ ======================== */
.story-grid { display: grid; gap: 2rem; align-items: center; }
/* Hai cột nội dung (không phải ảnh) phải cùng baseline trên cùng */
.story-grid--top { align-items: start; }
.story-grid img { width: 100%; border-radius: var(--r-lg); aspect-ratio: 4 / 5; object-fit: cover; }
.story-grid--wide img { aspect-ratio: 4 / 3; }

.quote-grid { display: grid; gap: 1rem; }
.quote {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.4rem;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}
.quote blockquote {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.06rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
}
.quote figcaption { display: flex; align-items: center; gap: 0.7rem; margin-top: auto; }
.quote img { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; flex: none; }
.quote cite { font-style: normal; font-weight: 600; font-size: 0.9rem; }
.quote small { display: block; color: var(--ink-soft); font-size: 0.78rem; }

.post-grid { display: grid; gap: 1.5rem; }
.post-card { display: flex; flex-direction: column; gap: 0.6rem; }
.post-card__media { border-radius: var(--r-lg); overflow: hidden; background: var(--accent-3); }
.post-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 550ms var(--ease-out);
}
.post-card:hover img { transform: scale(1.04); }
.post-card__meta {
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-11);
  font-weight: 600;
}
.post-card h3 { font-size: var(--step-2); margin: 0; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-11); }
.post-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
@media (min-width: 600px) {
  /* Excerpt 2 hay 3 dòng làm đáy các thẻ cùng hàng răng cưa */
  .post-card p { min-height: calc(3 * 1.65em); }
}

.news-box {
  border: 1px solid var(--line);
  border-radius: var(--r-shell);
  padding: clamp(2rem, 1.4rem + 2vw, 3rem);
  background: var(--accent-3);
  display: grid;
  gap: 1.4rem;
}
.news-form { display: grid; gap: 0.75rem; }
.news-form .field-row { display: grid; gap: 0.75rem; }

/* ============================ 09 TRANG CỬA HÀNG ========================== */
.page-head {
  position: relative;
  background: var(--accent-1);
  border-radius: 0 0 var(--r-shell) var(--r-shell);
  padding-block: clamp(3rem, 2.2rem + 3vw, 4.5rem) clamp(2.4rem, 1.8rem + 2.4vw, 3.5rem);
}
.page-head .lead { margin-top: 0.6rem; max-width: 52ch; }

.crumbs { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
.crumbs a { color: var(--ink-soft); text-decoration: none; display: inline-flex; align-items: center; min-height: 24px; }
.crumbs a:hover { color: var(--accent-11); text-decoration: underline; }

.shop-layout { display: grid; gap: 2rem; align-items: start; }

/* Khung bọc mới: là con trực tiếp của lưới nên nhận được position: sticky,
   đồng thời chứa nút mở/đóng bộ lọc ở khổ hẹp. */
.filters-wrap { display: grid; gap: 0.85rem; align-content: start; }
.filters-toggle { display: none; justify-content: space-between; }
.filters-toggle::after {
  content: "";
  width: 14px; height: 14px;
  background: currentColor;
  clip-path: polygon(50% 78%, 4% 24%, 16% 14%, 50% 54%, 84% 14%, 96% 24%);
  transition: transform var(--dur-ui) var(--ease-out);
}
.filters-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

.filters {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.2rem 1.4rem;
  background: var(--cream);
  display: grid;
  gap: 1.5rem;
}
.filter-group > h3 {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-11);
  margin-bottom: 0.75rem;
}
.radio-list { display: grid; gap: 0.35rem; }
.radio-list .radio-row { padding-left: 0; }
/* Một lưới duy nhất cho mọi hàng "icon + chữ": ô 1.25rem, khe 0.65rem.
   Dùng chung với .form-note để các dòng liên tiếp không lệch lề nhau. */
.radio-row, .check-row {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  align-items: start;
  gap: 0.65rem;
  font-size: 0.9rem;
  cursor: pointer;
  /* Vùng chạm 44px — cả nhãn là đích bấm, không chỉ ô vuông 17px. */
  padding-block: 0.6rem;
  min-height: 44px;
}
.radio-row input, .check-row input {
  margin: 0.15rem 0 0;
  accent-color: var(--accent-9);
  flex: none;
  width: 20px;
  height: 20px;
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}
.shop-count { display: flex; align-items: center; min-height: 44px; margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.select-wrap { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; font-size: 0.85rem; color: var(--ink-soft); }
/* Select native của OS lạc lõng giữa các control bo tròn — mọi select trong
   template dùng mũi tên SVG riêng và bán kính khớp .season-chip. */
select {
  min-height: 44px;
  padding: 0.5rem 2.35rem 0.5rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream) no-repeat right 0.9rem center/14px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F6B31' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.field select { border-radius: var(--r); }

/* Select tuỳ biến — nút + listbox, bo 999px khớp .season-chip, bàn phím đầy đủ.
   Dùng chung cho "Sắp xếp" trên thanh công cụ và "Khoảng giá" trong bộ lọc. */
.c-select { position: relative; display: inline-block; }
.c-select--block { display: block; width: 100%; }
.c-select__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur-hover) var(--ease-out),
              background-color var(--dur-hover) var(--ease-out);
}
.c-select__btn:hover { border-color: var(--accent-8); background: var(--accent-2); }
.c-select__btn svg {
  width: 15px; height: 15px;
  flex: none;
  stroke: var(--accent-11);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur-ui) var(--ease-out);
}
.c-select__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.c-select__list {
  position: absolute;
  z-index: 80;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 100%;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 32px -20px color-mix(in srgb, var(--accent-12) 60%, transparent);
}
.c-select__opt {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  white-space: nowrap;
  cursor: pointer;
}
.c-select__opt:hover, .c-select__opt.is-active { background: var(--accent-3); }
.c-select__opt[aria-selected="true"] { background: var(--accent-9); color: #fff; font-weight: 600; }
.c-select--end .c-select__list { left: auto; right: 0; }

/* ============================ 10 TRANG SẢN PHẨM ========================== */
.pdp { display: grid; gap: 2rem; align-items: start; }
.pdp__media img { width: 100%; border-radius: var(--r-lg); aspect-ratio: 4 / 5; object-fit: cover; }
.pdp__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 0.75rem; }
.pdp__thumbs button {
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--r);
  cursor: pointer;
  display: block;
}
.pdp__thumbs img { aspect-ratio: 1; border-radius: var(--r); object-fit: cover; width: 100%; }
.pdp__thumbs [aria-current="true"] {
  outline: 2px solid var(--accent-9);
  outline-offset: 2px;
}

.pdp__price {
  font-family: Fraunces, Georgia, serif;
  font-size: var(--step-3);
  font-weight: 600;
  color: var(--terra-deep);
  margin: 0.4rem 0 0.2rem;
}
.pdp__unit { font-size: 0.88rem; color: var(--ink-soft); }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.qty button {
  width: 44px; height: 46px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink);
  transition: background-color var(--dur-hover) var(--ease-out);
}
.qty button:hover { background: var(--accent-3); }
.qty input {
  width: 52px;
  height: 46px;
  border: 0;
  border-inline: 1px solid var(--line);
  background: transparent;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buy-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1.4rem 0; }
/* CTA chính phải to hơn hàng nút phụ bên dưới, không nhỏ hơn */
.buy-row > .btn-primary { flex: 1 1 12rem; }
.contact-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 0.6rem; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 0.75rem 1rem 0.75rem 0.2rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table th { font-weight: 600; color: var(--ink-soft); width: 42%; }

.prose { max-width: 56ch; }
/* Cột chữ hẹp trong section rộng: canh giữa thay vì bỏ trống nửa phải */
.prose--center { margin-inline: auto; }
.prose h2 { font-size: var(--step-3); margin-top: 2.4rem; }
.prose h3 { font-size: var(--step-2); margin-top: 1.9rem; }
/* Marker tự vẽ — bullet mặc định rơi ra ngoài lề cột chữ vài pixel */
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.1rem; }
.prose ul > li::before {
  content: "\00b7";
  position: absolute;
  left: 0.15rem;
  font-weight: 700;
  color: var(--accent-9);
}
.prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.45rem; }
.prose img { border-radius: var(--r-lg); margin: 1.9rem 0; }
.prose blockquote {
  margin: 1.9rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--accent-8);
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--accent-11);
}

/* ============================== 11 GIỎ HÀNG ============================== */
.cart-layout { display: grid; gap: 2rem; align-items: start; }
.cart-list { display: grid; gap: 1rem; }
.cart-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.9rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.cart-row img { width: 84px; height: 100px; object-fit: cover; border-radius: var(--r); }
.cart-row__name { font-family: Fraunces, Georgia, serif; font-size: 1.02rem; font-weight: 600; margin: 0; }
.cart-row__unit { font-size: 0.8rem; color: var(--ink-soft); }
.cart-row__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-top: 0.6rem; }
.cart-row__price { font-family: Fraunces, Georgia, serif; font-weight: 600; color: var(--terra-deep); margin-left: auto; }
.cart-row .qty button { width: 40px; height: 40px; font-size: 1rem; }
.cart-row .qty input { width: 42px; height: 40px; }
.link-remove {
  background: none;
  border: 0;
  padding: 0.35rem 0;
  color: var(--gray-11);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-remove:hover { color: var(--terra-deep); }

.cart-summary {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  background: var(--accent-1);
  display: grid;
  gap: 1rem;
}
.cart-summary[hidden] { display: none; }
.sum-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.sum-row--total {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.ship-meter { display: grid; gap: 0.5rem; }
.ship-meter__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--accent-3);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.ship-meter__fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--accent-9);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 450ms var(--ease-out);
}
.ship-meter__fill[data-done="true"] { background: var(--terra); }
.ship-meter p { font-size: 0.84rem; color: var(--ink-soft); margin: 0; }
.ship-meter strong { color: var(--terra-deep); }

.cart-empty { display: grid; gap: 1rem; justify-items: start; }
.cart-layout { align-items: start; }
/* Giỏ rỗng thì bảng tổng tiền bị ẩn — trả cột trái về full-width thay vì để
   lại một cột trống bên phải. */
.cart-layout:has(.cart-summary[hidden]) { grid-template-columns: 1fr; }

/* ============================== 12 BIỂU MẪU ============================== */
.form-grid { display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.4rem; }
.field > label { font-size: 0.85rem; font-weight: 600; }
/* Hint thuộc về ô ngay TRÊN nó — kéo sát lại để không dính vào field dưới */
.field .hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.15rem; }
.field input:not([type="checkbox"]):not([type="radio"]), .field textarea, .field select {
  width: 100%;
  min-height: 46px;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--cream);
  color: var(--ink);
  transition: border-color var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out);
}
.field input:not([type="checkbox"]):not([type="radio"]):focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent-9);
  box-shadow: 0 0 0 3px var(--accent-a5);
}
.field textarea { min-height: 130px; resize: vertical; }
.field[data-invalid="true"] input:not([type="checkbox"]):not([type="radio"]),
.field[data-invalid="true"] textarea { border-color: var(--terra); }
.field-error { font-size: 0.8rem; color: var(--terra-deep); font-weight: 500; }
.field-error:empty { display: none; }

.check-row.consent { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.55; }

/* Ô đồng ý là một .field để dùng chung cơ chế báo lỗi với các trường khác. */
.field--consent { gap: 0.15rem; }
.field--consent > label { font-weight: 400; }
.field--consent .check-row input { width: 20px; height: 20px; }
.field--consent[data-invalid="true"] .check-row input { outline: 2px solid var(--terra); outline-offset: 2px; }
.field--consent .field-error { padding-left: calc(1.25rem + 0.65rem); }
/* Không dùng flex ở đây: liên kết nằm giữa câu sẽ bị tách thành flex item và
   xuống dòng sai. Icon đặt tuyệt đối để chữ vẫn chảy theo dòng bình thường. */
.form-note {
  position: relative;
  display: block;
  padding-left: calc(1.25rem + 0.65rem);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.form-note svg {
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px; height: 20px;
  stroke: currentColor; fill: none; stroke-width: 1.6;
}

.form-ok {
  border: 1px solid var(--accent-8);
  background: var(--accent-3);
  border-radius: var(--r);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--accent-12);
}
.form-ok[hidden] { display: none; }

.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.info-list li { display: grid; gap: 0.35rem; }
.info-list b {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-11);
  font-weight: 600;
}

.map-placeholder {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--accent-2);
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.faq { display: grid; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  padding-inline: 0;
  min-height: 48px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.faq__q::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent-11);
  flex: none;
  align-self: start;
  margin-top: 0.15rem;
  transition: transform var(--dur-ui) var(--ease-out);
}
.faq__q[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq__a { padding: 0 0 1.2rem; font-size: 0.92rem; color: var(--ink-soft); max-width: 62ch; }
.faq__a[hidden] { display: none; }

/* ============================ 13 TRANG PHÁP LÝ =========================== */
.legal-doc { max-width: 56ch; display: grid; gap: 4rem; }
.legal-block { display: grid; gap: 0.55rem; }
.legal-block__n {
  font-family: Fraunces, Georgia, serif;
  font-size: 0.95rem;
  color: var(--accent-8);
  margin: 0;
  font-weight: 600;
}
.legal-block h2 { font-size: var(--step-2); margin: 0; }
.legal-block ul { margin: 0; padding-left: 0; list-style: none; }
.legal-block li { margin-bottom: 0.4rem; position: relative; padding-left: 1.1rem; }
.legal-block li::before {
  content: "\00b7";
  position: absolute;
  left: 0.15rem;
  font-weight: 700;
  color: var(--accent-9);
}
.legal-toc {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.2rem 1.3rem;
  background: var(--accent-1);
}
.legal-toc ol { margin: 0.6rem 0 0; padding-left: 1.2rem; font-size: 0.9rem; display: grid; gap: 0.35rem; }

/* ============================ 14 GDPR & TIỆN ÍCH ========================= */
.gdpr-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 400;
  background: var(--accent-12);
  color: var(--accent-3);
  border-top: 1px solid var(--accent-a6);
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
}
.gdpr-banner[hidden] { display: none; }
.gdpr-banner__inner { width: var(--shell); margin-inline: auto; display: grid; gap: 0.9rem; align-items: center; }
.gdpr-banner p { margin: 0; font-size: 0.85rem; line-height: 1.55; }
.gdpr-banner a { color: var(--accent-8); }
.gdpr-banner__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Không JS thì không hiện banner cookie — tránh khối chết không tắt được */
html:not(.js-on) .gdpr-banner { display: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 500;
  background: var(--accent-9);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r);
  text-decoration: none;
  /* Trượt bằng transform chứ không bằng top — giữ đúng luật chuyển động. */
  transform: translateY(calc(-100% - 1.5rem));
  transition: transform var(--dur-ui) var(--ease-out);
}
.skip-link:focus { transform: none; color: #fff; }

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

.leaf-mark { width: 22px; height: 22px; fill: var(--accent-9); }

/* ========================= 15 CHUYỂN ĐỘNG & A11Y ========================= */

/* Chuyển trang: View Transitions API — 0 JS, trình duyệt cũ tự bỏ qua */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: vt-out 300ms var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in 400ms var(--ease-out) both; }

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* Chế độ reveal 1 — fade-up khi cuộn tới, có bậc thang delay --i */
html.js-on .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-enter) var(--ease-out),
              transform var(--dur-enter) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--ladder));
}
html.js-on .reveal.is-in { opacity: 1; transform: none; }

/* Chế độ reveal 2 — mặt nạ dòng chữ, chỉ dành cho heading lớn */
.line-reveal { display: block; overflow: hidden; }
.line-reveal > span:not(.lr-w) { display: block; }
html.js-on .line-reveal > span:not(.lr-w) {
  transform: translateY(105%);
  transition: transform var(--dur-reveal) var(--ease-reveal);
  transition-delay: calc(var(--i, 0) * 110ms);
}
html.js-on .line-reveal.is-in > span:not(.lr-w) { transform: none; }

/* Biến thể theo từ — dùng cho H1: mỗi từ có mặt nạ riêng và vào so le.
   Mặt nạ nằm ở từng từ nên thẻ H1 phải để tràn tự do cho dòng xuống hàng. */
.line-reveal--words { overflow: visible; }
.line-reveal--words .lr-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  /* Chừa chỗ cho nét dưới của g, y, ạ — nếu không mặt nạ sẽ cắt mất. */
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.line-reveal--words .lr-w > span { display: inline-block; }
html.js-on .line-reveal--words .lr-w > span {
  transform: translateY(100%);
  transition: transform var(--dur-reveal) var(--ease-reveal);
  transition-delay: calc(var(--i, 0) * 60ms);
}
html.js-on .line-reveal--words.is-in .lr-w > span { transform: none; }

/* H1 hero tự lo phần vào trang bằng mặt nạ — bỏ fade-up để không chồng hiệu ứng. */
html.js-on .hero__text > .line-reveal--words { animation: none; }

/* Hero vào trang: fade-up so le, thuần CSS, không chờ JS */
@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
html.js-on .hero__text > * { animation: hero-in var(--dur-enter) var(--ease-out) both; }
html.js-on .hero__text > *:nth-child(1) { animation-delay: 80ms; }
html.js-on .hero__text > *:nth-child(2) { animation-delay: 160ms; }
html.js-on .hero__text > *:nth-child(3) { animation-delay: 260ms; }
html.js-on .hero__text > *:nth-child(4) { animation-delay: 340ms; }
html.js-on .hero__text > *:nth-child(5) { animation-delay: 420ms; }
html.js-on .hero__media { animation: hero-in var(--dur-enter) var(--ease-out) both; animation-delay: 200ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js-on .reveal { opacity: 1; transform: none; transition: none; }
  html.js-on .line-reveal > span:not(.lr-w) { transform: none; transition: none; }
  html.js-on .line-reveal--words .lr-w > span { transform: none; transition: none; }
  html.js-on .hero__text > *, html.js-on .hero__media { animation: none; }
  .hero__frame img { transform: scale(1.15); }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================== BREAKPOINT =============================== */
/* Dưới 600px header chỉ giữ tên thương hiệu, giỏ và nút menu — CTA "Đặt rau"
   đã có sẵn dạng nút lớn trong bảng menu nên bỏ đi để header không xuống dòng. */
@media (max-width: 599px) {
  .logo small { display: none; }
  .hd-cta { display: none; }
  .logo { font-size: 1.16rem; }

  /* Hai nút hero cùng chiều rộng — mép phải không răng cưa */
  .hero__actions .btn { width: 100%; }

  /* Tiêu đề 1 dòng và 2 dòng làm giá/nút của hai thẻ cùng hàng lệch nhau */
  .pcard__name { min-height: calc(2 * 1.25em); }
  .pcard__unit { min-height: calc(2 * 1.55em); }

  /* Banner cookie đang ăn 21% màn hình và che hết phần dưới hero */
  .gdpr-banner { padding: 0.75rem 1.1rem calc(0.75rem + env(safe-area-inset-bottom)); }
  .gdpr-banner p { font-size: 0.8rem; line-height: 1.45; }
  .gdpr-banner__inner { gap: 0.6rem; }
  .gdpr-banner__actions { flex-wrap: nowrap; }
  .gdpr-banner__actions .btn { flex: 1 1 0; min-height: 40px; padding-inline: 0.75rem; }

  /* Select bung hết bề ngang cho dễ bấm */
  .c-select, .select-wrap { width: 100%; }
  .select-wrap .c-select { flex: 1; }
  .c-select__list { left: 0; right: 0; }
}

@media (max-width: 767px) {
  /* WCAG 2.5.5 — đích bấm 44px, không phải 24px như ở desktop */
  .ft-col ul { gap: 0.15rem; }
  .ft-col ul a, .ft-col ul li > a { min-height: 44px; }
}

@media (max-width: 899px) {
  /* Bộ lọc mở sẵn đẩy sản phẩm đầu tiên xuống dưới 470px — gập lại mặc định */
  .filters-toggle { display: inline-flex; }
  .filters[data-open="false"] { display: none; }
}

@media (min-width: 600px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .usp-band ul { grid-template-columns: repeat(2, 1fr); }
  .quote-grid, .post-grid, .region-grid { grid-template-columns: repeat(2, 1fr); }
  .news-form .field-row { grid-template-columns: 1fr auto; align-items: end; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .fill-row { grid-template-columns: 2.75rem 1fr auto; padding-inline: 0.9rem; }
  .fill-row__end { grid-column: auto; }
  .cart-row { grid-template-columns: 110px 1fr; }
  .cart-row img { width: 110px; height: 132px; }
  .ft-grid { grid-template-columns: repeat(2, 1fr); }
  .gdpr-banner__inner { grid-template-columns: 1fr auto; }
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .burger { display: none; }
  .hero__grid { grid-template-columns: 1.02fr 0.98fr; }
  .hero__frame img { aspect-ratio: 5 / 6; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .usp-band ul { grid-template-columns: repeat(5, 1fr); }
  /* justify-content: flex-start là điều kiện giữ 5 icon cùng đường ngang —
     với `center`, ô có nhãn 2 dòng sẽ đẩy icon của nó lên cao hơn 9px. */
  .usp-pill { flex-direction: column; align-items: flex-start; justify-content: flex-start; min-height: 6.5rem; padding: 1.5rem 1.75rem; gap: 0.65rem; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
  .step { grid-template-columns: 5rem 1fr; }
  .region-grid { grid-template-columns: repeat(3, 1fr); }
  .quote-grid { grid-template-columns: repeat(3, 1fr); }
  .post-grid { grid-template-columns: repeat(3, 1fr); }
  .story-grid { grid-template-columns: 0.9fr 1.1fr; gap: 3rem; }
  .story-grid--rev { grid-template-columns: 1.1fr 0.9fr; }
  .shop-layout { grid-template-columns: 250px 1fr; gap: 2.6rem; }
  .pdp { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; }
  .cart-layout { grid-template-columns: 1.35fr 0.65fr; gap: 2.8rem; }
  .sec-head { grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 2rem; }
  .sec-head--stack { grid-template-columns: 1fr; }
  .grid-products { grid-template-columns: repeat(4, 1fr); }
  .grid-products--3 { grid-template-columns: repeat(3, 1fr); }
  .mobile-panel { display: none !important; }
  .ft-grid { grid-template-columns: 1.5fr 1fr 1fr 1.25fr; gap: 2.5rem 2rem; }
  .fill-row { padding: 1.6rem 1.2rem; gap: 1.6rem; }

  /* Bộ lọc dính theo trang khi cuộn — header cao 68px nên chừa 90px */
  .filters-wrap { position: sticky; top: 90px; }

  /* Hàng cuối của lưới 2 cột: gạch dưới thành đường kẻ mồ côi */
  .step:nth-last-child(2):nth-child(odd) { border-bottom: 0; padding-bottom: 0; }

  /* Cột phải PDP ngắn hơn cột trái 254px — cho nó chạy theo trang */
  .pdp__info { position: sticky; top: 90px; }

  /* Link "Xem tất cả" dính mép phải và đáy tiêu đề */
  .sec-head__link { justify-self: end; align-self: end; text-align: right; }
}

@media (min-width: 1100px) {
  .hero__inset { width: 34%; max-width: 230px; left: -12%; bottom: 2.5rem; }
}
