/* cancook.vn — QĐ-168 (anh Trí, 2026-12-02): màu + phông theo bản Codex trên Sites (docs/cancook/ban-giao-sites.md) — xanh rêu #173c31,
   nền kem #fcfcf7, nhấn xanh cốm #dceca8; tiêu đề phông có chân Georgia, chữ thân system-ui. Thay bộ than #231F20 của QĐ-088 điểm 4
   (logo vẫn than #231F20 + trắng — QĐ-016). Tầng nền (bố cục, chữ, trạng thái) ở storefront shop.css. Tương phản kiểm bằng
   packages/brand/test/sites.test.ts. */
:root {
  --site-primary: #173c31;          /* xanh rêu — nút chính, khối đầu trang chủ, chân trang; chữ trắng 12,16:1 */
  --site-primary-hover: #0f2b23;    /* chữ trắng 15,11:1 */
  --site-on-primary: #ffffff;
  --site-on-primary-muted: #c9d7cb; /* chữ phụ trên xanh rêu 8,14:1 */
  --site-accent: #3d6b1f;           /* xanh lá đậm — chữ trên kem 6,14:1, trên nền thẻ 5,71:1 */
  --site-ink: #172923;              /* chữ chính trên kem 14,81:1 */
  --site-ink-2: #3c4f47;            /* 8,50:1 */
  --site-muted: #55665e;            /* 5,92:1; trên nền thẻ #f1f5e9 5,50:1 */
  --site-line: #c9d7cb;             /* đường kẻ / viền thẻ (trang trí) */
  --site-input-border: #7d8c84;     /* viền ô nhập trên kem 3,43:1 */
  --site-bg: #fcfcf7;               /* kem */
  --site-surface: #ffffff;
  --site-soft: #f1f5e9;             /* nền thẻ xanh nhạt */
  --site-header-bg: #fcfcf7;        /* đục hẳn — 96 % làm chữ cuộn bên dưới lộ qua (soát điện thoại 2026-12-02) */
  --site-ok: #1b6b3a; --site-ok-line: #b9dfc6; --site-ok-tint: #f0f8f3;
  --site-warn: #8a5a00;
  --site-bad: #b42318; --site-bad-line: #f1c4bf; --site-bad-tint: #fdf2f1;
  --site-todo-bg: #fff3c4; --site-todo-ink: #5c4400;
  --site-focus-on-dark: #dceca8;   /* vòng focus trên xanh rêu 9,62:1 — WCAG 2.4.7 / 1.4.11 */
  --site-radius: 14px;
  --site-card-name-lines: 2;
}

/* ---------------------------------------------------------------------------------------------------------------------------------
   QĐ-168 — trình bày theo bản Codex. Chỉ cancook.vn nạp tệp này nên everyday.vn / modernhouse.vn không đổi. Tệp nạp TRƯỚC shop.css ⇒ luật
   đè lớp của shop.css dùng bộ chọn cụ thể hơn (tiền tố :root). Màu riêng của bản vẽ là biến --cc-* (chỉ cancook có); tương phản ghi cạnh mã. */
:root {
  --cc-lime: #dceca8;        /* nút trên xanh rêu, nhãn nhỏ trên xanh rêu (9,62:1) */
  --cc-lime-hover: #ebf5ce;
  --cc-lime-ink: #162d24;    /* chữ trên nút xanh cốm 11,57:1 */
  --cc-band: #e8efe4;        /* dải "Đặt hàng và hỗ trợ" — chữ chính 12,99:1, chữ phụ 5,19:1 */
  --cc-pill: #b5c3b6;        /* viền nút hotline đầu trang (trang trí — chữ bên trong là nhãn) */
  --cc-serif: Georgia, "Times New Roman", "Noto Serif", serif;   /* phông hệ thống — không tải gì, đủ dấu tiếng Việt */
}

/* Tiêu đề có chân, chữ thân giữ system-ui (shop.css). */
:root h1, :root h2 { font-family: var(--cc-serif); font-weight: 500; letter-spacing: -.02em; }
:root h1 { line-height: 1.08; }
:root h2 { font-size: clamp(24px, 3.2vw, 34px); line-height: 1.15; }
:root .foot h2 { font-family: inherit; font-weight: 700; font-size: 16px; letter-spacing: normal; }

/* Đầu trang: nền kem, menu đậm vừa, hotline dạng viên thuốc */
:root .top .wrap { min-height: 72px; gap: 24px; }
:root .nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }   /* vùng bấm ≥ 44 px */

/* Điện thoại (≤ 650 px): chỉ hàng logo dính đầu màn hình; menu là hàng riêng NGOÀI đầu trang, cuộn theo trang (cùng cách everyday). */
.cc-nav-m { display: none; }
@media (max-width: 650px) {
  :root .top .nav { display: none; }
  :root .top .wrap { min-height: 60px; }
  .cc-nav-m { display: block; background: var(--site-bg); border-bottom: 1px solid var(--site-line); }
  .cc-nav-m .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .cc-nav-m a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px; font-size: 15px;
    font-weight: 650; text-decoration: none; white-space: nowrap; }
  .cc-nav-m a:first-child { margin-left: -10px; }
  .cc-nav-m a[aria-current="page"], .cc-nav-m a:hover { background: var(--site-soft); }
}
.cc-phone { display: inline-flex; flex: none; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--cc-pill);
  border-radius: 999px; font-weight: 700; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-phone:hover { background: var(--site-soft); }
/* Điện thoại: số hotline nằm góc phải hàng logo (anh Trí, 2026-12-02) — luôn thấy, bấm là gọi. */
@media (max-width: 650px) {
  :root .top .wrap { gap: 10px; }
  .cc-phone { margin-left: auto; padding: 0 12px; font-size: 15px; }
}
@media (max-width: 360px) {   /* máy rất hẹp + có nút giỏ: logo, số, giỏ vẫn chung một hàng */
  :root .top .wrap { gap: 6px; }
  :root .top .logo img { height: 20px; }
  .cc-phone { padding: 0 9px; font-size: 14px; }
  :root .top .cart-link { padding: 8px 9px; gap: 4px; }
}

/* Nút chung: bo theo nhãn mới, nút viền trên kem */
:root .btn { border-radius: 10px; }
:root .btn-ghost { background: transparent; border-color: var(--site-input-border); }
:root .btn-ghost:hover { background: var(--site-soft); }

/* Khối đầu trang chủ: thẻ xanh rêu bo 24 px; có ảnh ⇒ chia 5 : 6 trên máy tính, ảnh xuống dưới trên điện thoại */
:root .cc-hero { margin: 12px 0 0; padding: 0; border: 0; border-radius: 24px; overflow: hidden; background: var(--site-primary); color: var(--site-on-primary); }
:root .cc-hero .hero-in { display: grid; padding: 0; }
.cc-intro { padding: clamp(28px, 4.5vw, 64px); align-self: center; }
/* Tiêu đề tối đa 68 px: ở 1440×900 khối đầu không còn kín màn hình, lộ đầu mục danh mục (soát máy tính 2026-12-02). */
:root .cc-hero h1 { margin: 0; font-size: clamp(40px, 5vw, 68px); letter-spacing: -.036em; color: var(--site-on-primary); }
.cc-label { display: block; margin: 0 0 14px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px; font-weight: 700;
  line-height: 1.4; letter-spacing: .13em; text-transform: uppercase; color: var(--cc-lime); }
.cc-name { text-transform: none; letter-spacing: .02em; }   /* tên thương hiệu luôn viết thường như logo */
:root .cc-hero .lead { margin: 20px 0 0; max-width: 34ch; font-size: 17px; color: var(--site-on-primary); }
:root .cc-hero .lead.cc-sub { margin-top: 8px; color: var(--site-on-primary-muted); font-size: 15px; }
:root .cc-hero .hero-cta { margin: 24px 0 0; }
:root .cc-hero .btn { background: var(--cc-lime); border-color: var(--cc-lime); color: var(--cc-lime-ink); font-weight: 700; }
:root .cc-hero .btn:hover { background: var(--cc-lime-hover); }
:root .cc-hero .btn-ghost { background: transparent; border-color: var(--site-on-primary-muted); color: var(--site-on-primary); font-weight: 600; }
:root .cc-hero .btn-ghost:hover { background: var(--site-primary-hover); }
:root .cc-hero .hero-hours, :root .cc-hero .hero-badges { color: var(--site-on-primary-muted); }
:root .cc-hero .hero-badges li::before { color: var(--cc-lime); }
:root .cc-hero :focus-visible { outline-color: var(--site-focus-on-dark); }
.cc-hero-img { height: 250px; background: var(--site-soft); }   /* ảnh căn bếp lấp đầy khung như bản Codex */
.cc-hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 860px) {
  :root .cc-hero.has-img .hero-in { grid-template-columns: 5fr 6fr; }
  .cc-hero-img { height: auto; min-height: 420px; }
}

/* Danh mục: thẻ xanh nhạt, cả thẻ là đường dẫn */
.cc-cats { padding-top: clamp(16px, 4vw, 40px); }
.cc-cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
/* Xếp đều theo số nhóm (lớp cc-n<số nhóm>, tối đa 6) — không để một thẻ lẻ một mình ở hàng cuối (soát máy tính 2026-12-02). */
@media (max-width: 649px) { .cc-cat-grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; } }   /* 2 cột: thẻ lẻ cuối trải cả hàng */
@media (min-width: 650px) {
  .cc-cat-grid.cc-n3, .cc-cat-grid.cc-n5, .cc-cat-grid.cc-n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cc-cat-grid.cc-n3 > li, .cc-cat-grid.cc-n6 > li { grid-column: span 2; }          /* 3 thẻ / hàng */
  .cc-cat-grid.cc-n5 > li { grid-column: span 2; }                                   /* 3 + 2: hai thẻ cuối mỗi thẻ 3 phần */
  .cc-cat-grid.cc-n5 > li:nth-child(n+4) { grid-column: span 3; }
}
@media (min-width: 850px) {
  .cc-cat-grid.cc-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cc-cat-grid.cc-n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cc-cat-grid.cc-n5 > li, .cc-cat-grid.cc-n5 > li:nth-child(n+4) { grid-column: auto; }
}
@media (max-width: 360px) { .cc-cat-grid { grid-template-columns: 1fr; } }
.cc-cat { display: flex; flex-direction: column; height: 100%; min-height: 150px; padding: 20px; border: 1px solid var(--site-line); border-radius: 14px;
  background: var(--site-soft); text-decoration: none; }
.cc-cat-name { font-size: 18px; font-weight: 700; line-height: 1.3; }
.cc-cat-count { margin: 6px 0 16px; color: var(--site-muted); font-size: 15px; }
.cc-cat-go { margin-top: auto; font-weight: 650; text-decoration: underline; text-underline-offset: .24em; }
.cc-cat:hover { border-color: var(--site-accent); }
.cc-cat:hover .cc-cat-go { text-decoration-thickness: 2px; }

/* Thẻ hàng: khung ảnh xanh nhạt có viền như thẻ danh mục */
:root .card-img { border: 1px solid var(--site-line); }

/* Dải "Đặt hàng và hỗ trợ" trước chân trang */
.cc-support { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin: 8px 0 0;
  padding: clamp(24px, 4vw, 40px); border-radius: 24px; background: var(--cc-band); }
:root .cc-support h2 { margin: 0; }
.cc-support p { margin: 8px 0 0; }
.cc-support .muted { color: var(--site-ink-2); }
.cc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cc-actions a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; text-underline-offset: .24em; }
