/* Bảng báo giá quà Tết 2027 (quatet.dtmart.co) — CHỈ bảng giá có lọc, kiểu bảng Excel, đỏ son + kem (Anh Huy chốt 03/12/2026).
   Điện thoại trước: mỗi dòng bảng thành 1 thẻ ngang. Xem DESIGN.md. */
:root {
  --kem: #f6efe2;        /* nền trang */
  --giay: #fffaf2;       /* dòng chẵn, ô lọc */
  --do-son: #8f1d14;     /* giá, nút chính, chip đang chọn */
  --do-tham: #5e110b;    /* đầu trang, đầu bảng, khối form */
  --vang-dong: #a8823a;  /* viền nhấn */
  --vang-nhat: #e3c98d;  /* chữ trên nền đỏ */
  --vang-nut: #e9c46a;   /* nút vàng trên nền đỏ */
  --muc: #2b1a12;
  --muc-phu: #6b5646;
  --vien: #e2d3b6;
  --chu-tieu-de: "Noto Serif", Georgia, "Times New Roman", serif;
  --chu: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; scroll-behavior: smooth; }
body { margin: 0; background: var(--kem); color: var(--muc); font: 400 16px/1.55 var(--chu); padding-bottom: 72px; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--do-son); }
h1, h2 { font-family: var(--chu-tieu-de); font-weight: 700; line-height: 1.25; margin: 0; }
.khung { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.an-chu { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.an-nho { display: none !important; }
.bo-qua { position: absolute; left: -999px; top: 8px; background: var(--giay); padding: 12px; z-index: 50; }
.bo-qua:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--do-son); outline-offset: 2px; }

/* ---------- Nút ---------- */
.nut { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px;
  border-radius: 3px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.nut-vang { background: var(--vang-nut); color: var(--do-tham); }
.nut-vang:hover { background: #f0d27f; }
.nut-zalo { background: transparent; color: #fff4dc; border-color: rgba(227, 201, 141, .7); }
.nut-zalo:hover { border-color: var(--vang-nhat); }
.nut-day { width: 100%; }
.nut-chu { background: none; border: 0; color: var(--do-son); font-weight: 600; font-size: 14px; cursor: pointer;
  min-height: 44px; padding: 0 2px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Đầu trang ---------- */
.dau { background: var(--do-tham); color: var(--vang-nhat); border-bottom: 1px solid var(--vang-dong); }
.dau-trong { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-height: 44px; }
.logo-hinh { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.logo-chu { font: 700 18px/1 var(--chu-tieu-de); color: #fff4dc; white-space: nowrap; }
.logo-chu em { font-style: normal; color: var(--vang-nhat); font-size: 15px; }
.dau-lien-he { display: flex; align-items: center; gap: 10px; }
.dau-goi { color: #fff4dc; text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; padding: 12px 0; }
.dau .nut-zalo { display: none; }

/* ---------- Tiêu đề trang ---------- */
.tieu-de-trang { padding: 22px 0 18px; }
.nhan-muc { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--do-son); }
.nhan-muc::before { content: ""; width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); }
.tieu-de-trang h1 { font-size: clamp(24px, 6.2vw, 36px); color: var(--do-tham); }
.tom-tat { margin: 8px 0 0; color: var(--muc-phu); font-size: 15px; }
.tom-tat strong { color: var(--muc); }
.uu-dai { color: var(--do-son); font-weight: 700; white-space: nowrap; }

/* ---------- Bộ lọc ---------- */
.loc-khung { background: var(--giay); border-top: 1px solid var(--vien); border-bottom: 1px solid var(--vien); }
.loc { display: grid; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.loc-hang { display: flex; align-items: center; gap: 10px; min-width: 0; }
.loc-ten { flex: none; width: 92px; font-size: 13px; font-weight: 700; color: var(--muc-phu); }
.tim { flex: 1; position: relative; display: block; min-width: 0; }
.tim svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  fill: none; stroke: var(--muc-phu); stroke-width: 2; stroke-linecap: round; }
.tim input { width: 100%; min-height: 44px; padding: 10px 12px 10px 38px; border: 1px solid var(--vien);
  background: #fff; border-radius: 3px; font-size: 16px; }
.tim input:focus, .sap-xep select:focus { border-color: var(--vang-dong); outline: none; box-shadow: 0 0 0 3px rgba(168, 130, 58, .2); }
.sap-xep select { min-height: 44px; padding: 8px 10px; border: 1px solid var(--vien); background: #fff; border-radius: 3px; font-size: 15px; }
.nhom-chip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px; }
.nhom-chip::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 6px 14px; border: 1px solid var(--vien); background: #fff;
  border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--vang-dong); }
.chip[aria-pressed="true"] { background: var(--do-son); border-color: var(--do-son); color: #fff8e8; }
/* Thanh kéo giá 2 đầu (mỗi nấc 500.000đ) */
.keo-gia { flex: 1; min-width: 0; max-width: 560px; padding-right: 4px; }
.keo-chu { margin: 0 0 2px; font-weight: 700; font-size: 15px; color: var(--do-son); }
.keo-ray { position: relative; height: 44px; }
.keo-ray::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--vien); }
.keo-day { position: absolute; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--do-son); left: 0; right: 0; }
.keo-ray input { position: absolute; left: 0; top: 0; width: 100%; height: 44px; margin: 0; background: none; pointer-events: none;
  -webkit-appearance: none; appearance: none; }
.keo-ray input::-webkit-slider-runnable-track { background: none; border: 0; }
.keo-ray input::-moz-range-track { background: none; border: 0; }
.keo-ray input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 3px solid var(--do-son); box-shadow: 0 1px 4px rgba(43, 26, 18, .35); cursor: grab; }
.keo-ray input::-moz-range-thumb { pointer-events: auto; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--do-son); box-shadow: 0 1px 4px rgba(43, 26, 18, .35); cursor: grab; }
.keo-ray input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--vang-dong); outline-offset: 2px; }
.keo-moc { position: relative; height: 18px; font-size: 12px; color: var(--muc-phu); margin-top: -4px; }
.keo-moc span { position: absolute; top: 0; left: calc(14px + (100% - 28px) * var(--v)); transform: translateX(-50%); white-space: nowrap; }
.keo-moc span:last-child { transform: translateX(-80%); }
.ket-qua-dong { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 6px; min-height: 44px; }
.ket-qua-dong p { margin: 0; font-size: 15px; font-weight: 600; color: var(--muc-phu); }

/* ---------- Bảng (điện thoại: mỗi dòng = thẻ ngang) ---------- */
.bang { width: 100%; border-collapse: collapse; }
.bang thead { display: none; }
.bang tbody tr { display: grid; grid-template-columns: 96px 1fr; grid-template-areas: "anh ten" "anh gia" "tp tp";
  column-gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--vien); margin-bottom: 8px; }
.bang td { display: block; padding: 0; }
.c-stt { display: none !important; }
.bang .c-anh { grid-area: anh; }
.bang .c-ten { grid-area: ten; }
.bang .c-gia { grid-area: gia; align-self: start; font-weight: 700; font-size: 18px; color: var(--do-son);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.bang .c-tp { grid-area: tp; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--vien); }
.nut-anh { display: block; width: 96px; padding: 0; border: 1px solid var(--vien); background: #fff; cursor: zoom-in; }
.nut-anh img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.ten { display: block; font-weight: 700; font-size: 16px; line-height: 1.35; }
.phu { display: block; font-size: 13px; color: var(--muc-phu); margin-top: 2px; }
.tp { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.5; color: #4a372b; }
.tp li { position: relative; padding-left: 14px; }
.tp li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; background: var(--vang-dong); transform: rotate(45deg); }
.tp-gon li:nth-child(n + 5) { display: none; }
.nut-du { min-height: 44px; font-size: 13px; }
.trong { padding: 24px; text-align: center; background: #fff; border: 1px dashed var(--vien); color: var(--muc-phu); }
.chu-thich { font-size: 13px; color: var(--muc-phu); margin: 14px 0 32px; }

/* ---------- Form ---------- */
.muc-do { background: var(--do-tham); color: #f3e4c8; padding: 36px 0; }
.muc-do a:not(.nut) { color: var(--vang-nhat); }
.form-khung { display: grid; gap: 20px; }
.form-gioi-thieu h2 { font-size: clamp(24px, 6vw, 34px); color: #fff8e8; margin-bottom: 8px; }
.form-gioi-thieu p { color: #e9d6b4; margin: 0 0 8px; }
.form { background: var(--giay); color: var(--muc); padding: 18px; border: 1px solid var(--vang-dong);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.o { grid-column: 1 / -1; display: grid; gap: 4px; }
.o label { font-size: 14px; font-weight: 600; color: var(--do-tham); }
.o label small { font-weight: 400; color: var(--muc-phu); }
.o input, .o select, .o textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--vien);
  background: #fff; border-radius: 3px; font-size: 16px; }
.o input:focus, .o select:focus, .o textarea:focus { border-color: var(--vang-dong); outline: none; box-shadow: 0 0 0 3px rgba(168, 130, 58, .2); }
.o-an { display: none; }
.dong-y { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muc-phu); }
.form .nut { grid-column: 1 / -1; min-height: 48px; }
.form-ket-qua { grid-column: 1 / -1; margin: 0; padding: 12px; background: #fff; border-left: 3px solid var(--vang-dong); font-size: 15px; }

/* ---------- Chân trang ---------- */
.chan { background: #24120e; color: #d9c7a6; padding: 28px 0 20px; font-size: 14px; }
.chan a { color: #f0d9a8; }
.chan-ten { font: 700 17px/1.2 var(--chu-tieu-de); color: #fff4dc; margin: 0 0 8px; }
.chan-trong { display: grid; gap: 18px; }
.chan p { margin: 0 0 8px; }
.chan-phap-ly { color: #b9a582; }

/* ---------- Thanh dưới (điện thoại) ---------- */
.thanh-duoi { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr 1.6fr;
  gap: 8px; padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: rgba(255, 250, 242, .97);
  border-top: 1px solid var(--vang-dong); }
.thanh-duoi > a { min-height: 48px; border-radius: 3px; display: grid; place-items: center; font-weight: 700; font-size: 15px; text-decoration: none; }
.thanh-goi, .thanh-zalo { border: 1px solid var(--do-son); color: var(--do-son); background: #fff; }
.thanh-bao-gia { background: var(--do-son); color: #fff8e8; }

/* ---------- Xem ảnh lớn ---------- */
.hop-thoai { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; }
.hop-thoai::backdrop { background: rgba(36, 18, 14, .72); }
.hop-thoai[open] { display: flex; align-items: center; justify-content: center; }
.ht-trong { background: #fff; width: min(640px, calc(100% - 24px)); position: relative; border: 1px solid var(--vang-dong); }
.ht-trong img { width: 100%; max-height: 78vh; object-fit: contain; }
.xa-chu { margin: 0; padding: 10px 14px; font-size: 15px; background: var(--giay); }
.xa-chu strong { color: var(--do-son); }
.dong { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border: 0; background: rgba(255, 250, 242, .92);
  font-size: 28px; line-height: 1; cursor: pointer; border-radius: 50%; color: var(--muc); }

/* ---------- Máy tính bảng trở lên: bảng thật như Excel ---------- */
@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .thanh-duoi { display: none; }
  .an-nho { display: inline-flex !important; }
  .dau .nut-zalo { display: inline-flex; }
  .tieu-de-trang { padding: 30px 0 22px; }
  .loc-dau .tim { max-width: 520px; }
  .loc-dau .sap-xep { margin-left: auto; }
  .nhom-chip { flex-wrap: wrap; overflow: visible; }
  .bang { border: 1px solid var(--vien); background: #fff; }
  .bang thead { display: table-header-group; }
  .bang th { position: sticky; top: 0; z-index: 5; background: var(--do-tham); color: #fff4dc; text-align: left;
    font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 10px 12px; }
  .bang tbody tr { display: table-row; padding: 0; margin: 0; border: 0; border-bottom: 1px solid var(--vien); }
  .bang tbody tr:nth-child(even) { background: var(--giay); }
  .bang tbody tr:hover { background: #fbf1dc; }
  .bang td { display: table-cell; vertical-align: top; padding: 12px; }
  .c-stt { display: table-cell !important; width: 44px; color: var(--muc-phu); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
  th.c-stt { text-align: right; }
  .bang .c-anh { width: 132px; }
  .nut-anh { width: 108px; }
  .bang .c-ten { width: 24%; }
  .bang .c-tp { margin: 0; padding-top: 12px; border-top: 0; }
  .tp { columns: 2; column-gap: 24px; }
  .tp li { break-inside: avoid; }
  .bang .c-gia { width: 130px; text-align: right; font-size: 17px; }
  .bang th.c-gia { text-align: right; color: #fff4dc; font-size: 13px; }
  .form-khung { grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
  .o-doi { grid-column: span 1; }
  .chan-trong { grid-template-columns: 1.2fr 1.2fr 1fr; }
}
@media (min-width: 1100px) {
  .tp-gon li:nth-child(n + 5) { display: list-item; }
  .tp-gon + .nut-du { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .dau-lien-he, .loc-khung, .ket-qua-dong, .muc-do, .thanh-duoi, .chan { display: none !important; }
  .tp-gon li { display: list-item !important; } .nut-du { display: none !important; }
}
