/* =========================================================================
   Mộc An — hệ thống giao diện
   Bố cục, bảng màu và thang chữ dựng theo đúng mẫu tham chiếu timcraft.vn:
   nền #DADAD2, chữ đen, footer trắng, Montserrat, khung nội dung 1210px,
   header logo ở giữa, thẻ sản phẩm phẳng không viền không đổ bóng.
   ========================================================================= */

:root {
  --ground: #dadad2;   /* nền toàn trang */
  --white: #ffffff;    /* footer, lớp nổi, ô nhập */
  --ink: #000000;      /* toàn bộ chữ */
  --muted: rgba(0, 0, 0, 0.56);
  --line: rgba(0, 0, 0, 0.16);
  --line-soft: rgba(0, 0, 0, 0.08);
  --veil: rgba(0, 0, 0, 0.2);
  --veil-strong: rgba(0, 0, 0, 0.4);
  --danger: #c31829;
  --ok: #207d36;

  --wrap: 1210px;
  --gutter: 30px;
  --gap-section: 100px;   /* padding dọc của mỗi khối nội dung */

  --font: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light;
}

/* ---------------------------------------------------------------- Nền tảng */

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* Thang chữ theo mẫu: tiêu đề dùng Montserrat Medium 500, không in hoa,
   không giãn chữ, line-height 1.5 — cùng nhịp với chữ thường. */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.5; margin: 0 0 16px; }
h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h1 em, h2 em { font-style: italic; }

p { margin: 0 0 16px; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--white); padding: 10px 16px;
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----------------------------------------------------------------- Bố cục */

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding: var(--gap-section) 0; }
.section--tight { padding: 40px 0; }
.section--white { background: var(--white); }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }

/* Khối chữ hẹp căn giữa — tương ứng .noidung (1024px) của mẫu. */
.measure { max-width: 1024px; margin-inline: auto; text-align: center; }
/* Khối mở đầu căn trái, hẹp hơn — tương ứng .mota (670px) của mẫu. */
.intro { max-width: 670px; }

.eyebrow { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.lede { font-size: 15px; line-height: 1.9; }

.section-head { margin-bottom: 40px; }
.section-head h2 { margin-bottom: 8px; }
.section-head p { margin: 0; max-width: 62ch; }
.section-head--center { text-align: center; }
.section-head--center p { margin-inline: auto; }

.grid { display: grid; gap: 40px 30px; }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* "Xem tất cả" — chữ in hoa 22px căn giữa, không khung nút, đúng như mẫu. */
.see-all { text-align: center; padding: 40px 0 0; }
.see-all a {
  display: inline-block; padding: 10px 0;
  font-size: 22px; line-height: 1.5; text-transform: uppercase;
}

/* ---------------------------------------------------------------- Nút bấm */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: 400 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: 0.06em;
  cursor: pointer; text-decoration: none;
  transition: background-color 0.18s, color 0.18s;
}
.btn:hover { background: var(--ink); color: var(--ground); text-decoration: none; }
.btn--solid { background: var(--ink); color: var(--ground); }
.btn--solid:hover { background: transparent; color: var(--ink); }
.btn--wide { width: 100%; }
.btn--sm { padding: 9px 16px; font-size: 12px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* Kiểu "liên kết gạch chân" cho hành động phụ — mẫu dùng rất nhiều. */
.link-line {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 400 13px/1.5 var(--font); color: var(--ink);
  border-bottom: 1px solid var(--ink);
}
.link-line:hover { opacity: 0.6; text-decoration: none; }

/* ------------------------------------------------------------------ Header */

/* Ba vùng: trái (Menu · Tìm kiếm) — giữa (logo) — phải (giỏ hàng).
   Dùng grid 1fr auto 1fr để logo luôn nằm đúng tâm trang bất kể hai bên dài
   ngắn khác nhau. */
.site-header { background: var(--ground); }
.header-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 100px;
}
.header-left { display: flex; align-items: center; gap: 26px; }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }

.header-bar button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 400 16px/50px var(--font); color: var(--ink);
}
.header-bar button:hover { text-decoration: underline; }
.header-right a { font-size: 16px; line-height: 50px; }

.brand { display: flex; align-items: center; gap: 10px; justify-self: center; }
/* Dấu logo.
 *
 * Hình lấy từ KÊNH ALPHA của file PNG khách gửi, dùng làm CSS mask, còn màu do
 * `currentColor` quyết định — không đặt ảnh bằng <img>.
 *
 * Lý do: nét trong ảnh gốc có độ sáng cao nhất chỉ 159/255 (bạc rất nhạt). Đặt
 * thẳng lên nền #DADAD2 thì tương phản quá thấp, gần như không đọc được. Qua
 * mask thì nét ăn theo màu chữ nên đen rõ trên nền sáng, và tự sáng lên nếu
 * đặt trên nền tối, mà vẫn giữ đúng từng đường nét của bản gốc.
 *
 * Tỉ lệ 1.6:1 lấy từ hộp bao thật của nét sau khi cắt lề trống. */
.brand-mark {
  display: block; flex: none;
  width: 78px; height: 49px;
  background-color: currentColor;
  -webkit-mask: url("/assets/logo-mask.png") no-repeat center / contain;
  mask: url("/assets/logo-mask.png") no-repeat center / contain;
}
.brand-name { font-size: 22px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; }
.brand-sub { display: block; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.brand:hover { text-decoration: none; }

.cart-count { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------ Ngăn kéo điều hướng */

/* Mẫu không có thanh nav ngang: mọi mục nằm trong ngăn kéo 400px trượt từ
   trái, ở cả desktop lẫn mobile — và ngăn kéo mang logo riêng ở đầu. */
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 99999;
  width: min(400px, 100%); padding: 60px 0 20px;
  background: var(--ground);
  transform: translateX(-100%);
  transition: transform 0.5s;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.is-open { transform: none; }

/* Logo chiếm trọn bề ngang ngăn kéo và căn giữa, cao 80px. */
.drawer-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 100px; margin-bottom: 20px;
}
.drawer-brand:hover { text-decoration: none; }
.drawer-brand .brand-mark { width: 112px; height: 70px; }

.drawer ul { list-style: none; margin: 0; padding: 0 40px; }
.drawer li > a { display: block; padding: 15px 0; font-size: 17px; }
.drawer .sub { margin: 0 0 6px 18px; padding: 0; }
.drawer .sub a { padding: 8px 0; font-size: 14px; color: var(--muted); }
.drawer .sub a:hover { color: var(--ink); }

.drawer-close {
  position: absolute; top: 5px; right: 7px;
  width: 35px; height: 35px; border: 0; cursor: pointer;
  background: var(--veil); color: var(--ink);
  font-size: 20px; line-height: 35px; text-align: center;
}

.scrim {
  position: fixed; inset: 0; z-index: 9998;
  background: var(--veil-strong);
  opacity: 0; pointer-events: none; transition: opacity 0.5s;
}
.scrim.is-on { opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------- Lớp tìm kiếm */

/* Dải cố định cao 85px, nằm sẵn ngoài mép trên (top: -150px) và trượt xuống
   0 khi mở — đúng cơ chế .wap_search của mẫu, không phải một khối chèn vào
   luồng tài liệu (chèn vào luồng sẽ đẩy cả trang xuống khi mở). */
.search-layer {
  position: fixed; top: -150px; left: 0; right: 0; z-index: 999;
  height: 85px; padding: 15px 0;
  background: var(--ground);
  transition: top 0.4s;
}
.search-layer.is-open { top: 0; }

.search-layer form {
  display: flex; justify-content: space-between; align-items: center;
  height: 55px;
}
.search-layer input {
  flex: 1; min-width: 0; height: 55px; padding: 0 10px;
  border: 0; border-bottom: 1px solid var(--veil);
  background: transparent; color: var(--ink);
  font: 400 13px var(--font);
}
.search-layer form > button {
  width: 55px; height: 55px; flex: none;
  border: 0; border-bottom: 1px solid var(--veil);
  background: transparent; color: var(--ink); cursor: pointer;
}
.search-layer .close {
  position: absolute; top: 0; right: 0;
  width: 30px; height: 30px; border: 0;
  background: var(--veil); color: var(--ink);
  font-size: 20px; line-height: 30px; text-align: center; cursor: pointer;
}

/* -------------------------------------------------------------------- Hero */

/* Trang chủ theo đúng nhịp của mẫu: khối mở đầu 100px trên dưới, ảnh lớn
   không đệm dọc, đoạn dẫn căn giữa 100px trên dưới, "Xem tất cả", rồi hàng
   cam kết đệm đáy 100px. */
.home-intro { padding: var(--gap-section) 0; }
.home-note { padding: var(--gap-section) 0; }
.home-note + .see-all { padding-top: 0; }
.home-image a { display: block; aspect-ratio: 1210 / 786; overflow: hidden; }
.home-image .media { width: 100%; height: 100%; }
.pledges-band { padding: 0 0 var(--gap-section); }

.hero { padding: var(--gap-section) 0 0; }
.hero h1 { margin-bottom: 20px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* Ảnh lớn tràn khung nội dung, tỉ lệ ~1210×786 như mẫu. */
.hero-figure { margin-top: 60px; aspect-ratio: 1210 / 786; overflow: hidden; }
.hero-figure .media { width: 100%; height: 100%; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: 0; }
.stats dt { font-size: 26px; font-weight: 500; }
.stats dd { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* ----------------------------------------------- Cam kết / giá trị / quy trình */

/* Bốn ô ngang, gap 30px, chữ căn giữa, mỗi ô mở đầu bằng một icon 40×40 —
   đúng .camket của mẫu. Ở 1210px: 4 × 280 + 3 × 30 = 1210. */
.pledges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.pledge { text-align: center; }
.pledge .icon {
  display: block; width: 40px; height: 40px; margin: 0 auto 14px;
  color: var(--ink);
}
.pledge h3 { font-size: 16px; margin-bottom: 8px; }
.pledge p { margin: 0; font-size: 14px; }

/* Biến thể đánh số dùng cho quy trình — ở đó thứ tự MANG thông tin (bước 1
   phải trước bước 2), khác với cam kết vốn không có thứ tự. */
.pledge .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 14px;
  border: 1px solid var(--ink); border-radius: 50%;
  font-size: 13px;
}

/* ------------------------------------------------------------ Ảnh / media */

.media { display: block; width: 100%; height: 100%; object-fit: cover; }
.media--placeholder { display: block; overflow: hidden; background: rgba(0, 0, 0, 0.06); }
.media--placeholder svg { display: block; width: 100%; height: 100%; }

/* -------------------------------------------------------- Thẻ sản phẩm */

/* Thẻ phẳng: nền trong suốt, không viền, không bo góc, không đổ bóng, ảnh
   vuông, chữ căn giữa — copy đúng .item của mẫu. */
.card { display: flex; flex-direction: column; text-align: center; }
.card-media { position: relative; aspect-ratio: 1; overflow: hidden; background: rgba(0, 0, 0, 0.06); }
.card-media .media { position: absolute; inset: 0; transition: transform 0.5s ease; }
.card:hover .card-media .media { transform: scale(1.04); }

.card-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 10px; background: var(--ground);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}

.quick-view {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 12px 0; border: 0; width: 100%;
  background: var(--veil-strong); color: var(--white);
  font: 400 12px/1.2 var(--font); text-transform: uppercase; letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0; transform: translateY(100%);
  transition: opacity 0.22s, transform 0.22s;
}
.card:hover .quick-view, .quick-view:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .quick-view { opacity: 1; transform: none; } }

.card-body { padding: 16px 0 0; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.card-cat { font-size: 12px; color: var(--muted); }
.card-title { font-size: 17.5px; font-weight: 500; line-height: 1.5; margin: 0; }
.card-meta { font-size: 13px; color: var(--muted); margin: 0; }
.card-foot { margin-top: auto; padding-top: 10px; display: grid; gap: 10px; justify-items: center; }
.price { font-size: 13px; }
.price--ask { color: var(--muted); }

/* ---------------------------------------------------------- Bộ lọc / chip */

.filters {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  padding: 0 0 20px; margin-bottom: 40px; border-bottom: 1px solid var(--line);
}
.filters label { font-size: 13px; color: var(--muted); }
.filters select, .filters input[type="search"] {
  padding: 9px 10px; border: 1px solid var(--line);
  background: var(--white); color: var(--ink); font: 400 13px var(--font);
}
.filters .spacer { margin-left: auto; }
.result-count { font-size: 13px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 28px; }
.chip { font-size: 15px; padding-bottom: 4px; border-bottom: 1px solid transparent; }
.chip:hover { text-decoration: none; border-bottom-color: var(--line); }
.chip[aria-current="true"] { border-bottom-color: var(--ink); }

/* -------------------------------------------------- Chi tiết sản phẩm */

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.product-gallery { display: grid; gap: 14px; }
.product-gallery .main { aspect-ratio: 1; overflow: hidden; background: rgba(0, 0, 0, 0.06); }
.product-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.product-thumbs > * { aspect-ratio: 1; overflow: hidden; background: rgba(0, 0, 0, 0.06); }

.spec-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.spec-table th { width: 40%; font-weight: 400; color: var(--muted); }

.price-block { padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 24px 0; }
.price-block .amount { font-size: 22px; font-weight: 500; }
.price-block .note { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--ink); }
.qty button { width: 40px; height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 16px; cursor: pointer; }
.qty button:hover { background: rgba(0, 0, 0, 0.06); }
.qty input { width: 48px; height: 44px; border: 0; background: transparent; text-align: center; font: 400 14px var(--font); color: var(--ink); }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.qty input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.buy-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* -------------------------------------------------------------- Bài viết */

.post-head { max-width: 1024px; margin-inline: auto; text-align: center; }
.post-meta { font-size: 13px; color: var(--muted); }
.post-cover { aspect-ratio: 1210 / 640; overflow: hidden; margin: 40px 0; background: rgba(0, 0, 0, 0.06); }
.prose { max-width: 800px; margin-inline: auto; font-size: 15px; line-height: 1.9; }
.prose p { margin-bottom: 1.3em; }
.prose strong { font-weight: 700; }

.post-card .card-media { aspect-ratio: 3 / 2; }
.post-card .card-body { text-align: center; }
.tag { display: inline-block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* ---------------------------------------------------------------- Form */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.field .req { color: var(--danger); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font: 400 14px/1.5 var(--font);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
/* .hint dùng cả trong .field lẫn ngoài (ghi chú dưới form, dưới bảng giỏ),
   nên khai báo ở phạm vi chung thay vì lồng trong .field. */
.hint { font-size: 12px; color: var(--muted); }
.field .hint { margin: 0; }

/* Hành động phá huỷ (xoá dòng trong giỏ) — cùng dáng .link-line nhưng đỏ. */
.link-danger {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 400 12px/1.5 var(--font); color: var(--muted);
  text-decoration: underline;
}
.link-danger:hover { color: var(--danger); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-note { padding: 12px 14px; font-size: 14px; border: 1px solid var(--ink); }
.form-note[data-kind="ok"] { border-color: var(--ok); color: var(--ok); }
.form-note[data-kind="err"] { border-color: var(--danger); color: var(--danger); }
.form-note[hidden] { display: none !important; }

/* ---------------------------------------------------------------- Giỏ hàng */

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--ink); font-weight: 400; }
.cart-table td { padding: 18px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.cart-item { display: flex; gap: 16px; align-items: center; text-align: left; }
.cart-item .thumb { width: 76px; height: 76px; flex: none; overflow: hidden; background: rgba(0, 0, 0, 0.06); }
.cart-item strong { display: block; font-size: 15px; font-weight: 500; }
.cart-item small { color: var(--muted); font-size: 12px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 24px 0; }
.cart-total .amount { font-size: 22px; font-weight: 500; }

.layout-2col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: start; }
.panel { background: var(--white); padding: 30px; }

/* Giỏ rỗng: cột thanh toán bị ẩn nhưng grid vẫn giữ chỗ 1fr, khiến ô
   "giỏ đang trống" co lại còn nửa trang. Về một cột trong trường hợp đó. */
.layout-2col.is-empty { grid-template-columns: 1fr; }

/* --------------------------------------------------------- Trạng thái rỗng */

.empty { text-align: center; padding: 70px 20px; border: 1px solid var(--line); }
.empty h3 { font-size: 16px; }

/* ------------------------------------------------------------------- Modal */

dialog.modal {
  width: min(900px, calc(100% - 32px));
  padding: 0; border: 0; background: var(--ground); color: var(--ink);
}
dialog.modal::backdrop { background: var(--veil-strong); }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; }
.modal-media { aspect-ratio: 1; background: rgba(0, 0, 0, 0.06); }
.modal-content { padding: 34px; display: flex; flex-direction: column; }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 35px; height: 35px; border: 0;
  background: var(--veil); color: var(--white); cursor: pointer; font-size: 18px; line-height: 1;
}

/* ------------------------------------------------------------------- Toast */

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 130;
  transform: translate(-50%, 16px);
  padding: 13px 24px; background: var(--ink); color: var(--white);
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------- Liên hệ nổi */

.floating-contact { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 12px; }
.floating-contact a {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--white); color: var(--ink);
  box-shadow: 0 2px 10px rgb(0 0 0 / 18%);
}
.floating-contact a:hover { background: var(--ink); color: var(--white); }
.floating-contact svg { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ Footer */

/* Footer nền trắng, padding 50px 0, chữ đen 14px — đúng .wap_footer của mẫu. */
.site-footer { background: var(--white); padding: 50px 0; margin-top: var(--gap-section); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; }
.site-footer h4 { font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}

/* ------------------------------------------------------------- Breadcrumb */

.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 8px; }

/* ------------------------------------------------------------------ Dải CTA */

/* Nền màu nền chung, KHÔNG trắng: khối blog phía trên và footer phía dưới
   đều trắng, để dải này trắng nữa thì ba khối dính thành một mảng trắng dài. */
.cta-band { background: var(--ground); padding: var(--gap-section) 0; text-align: center; }
.cta-band .inner { max-width: 640px; margin-inline: auto; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ----------------------------------------------------------------- Mobile */

@media (max-width: 1000px) {
  :root { --gap-section: 70px; }
  .product-detail, .layout-2col, .modal-body { grid-template-columns: 1fr; gap: 40px; }
  .modal-media { aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pledges { grid-template-columns: 1fr 1fr; gap: 40px 30px; }
  .home-image a { aspect-ratio: 4 / 3; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --gap-section: 56px; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .header-bar { min-height: 72px; }
  .header-left { gap: 18px; }
  .header-bar button, .header-right a { font-size: 14px; line-height: 34px; }
  .brand-name { font-size: 17px; letter-spacing: 0.16em; }
  .brand-mark { width: 58px; height: 36px; }
  .brand-sub { display: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 20px; }
  .field-row { grid-template-columns: 1fr; }
  .see-all a { font-size: 18px; }
  .hero-figure { margin-top: 36px; aspect-ratio: 4 / 3; }

  /* Bảng giỏ hàng chuyển sang thẻ xếp dọc — 4 cột không đọc được ở bề ngang
     điện thoại. */
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
  .cart-table td { border: 0; padding: 5px 0; }
  .cart-table td[data-label]::before { content: attr(data-label) " · "; font-size: 12px; color: var(--muted); }
}

@media (max-width: 560px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr 1fr; gap: 30px 18px; }
  .card-title { font-size: 15px; }
  .pledges { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* Dưới 380px, lưới 2 cột để lại cột nội dung quá hẹp cho chuỗi giá dài nhất. */
@media (max-width: 380px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .floating-contact, .quick-view, .btn, .drawer, .scrim { display: none !important; }
}
