/* Mực cán tẩm Nhà Mặn – web vệ tinh muctamnhatrang.vn
   Bố cục: cửa hàng thu nhỏ mượn màu nhãn hũ mực (vàng nghệ, đỏ ớt, dải xanh biển),
   khối thông tin trình bày như mặt sau nhãn thực phẩm, thanh Zalo/Gọi cố định ở đáy màn hình điện thoại. */
:root {
  --bg: #fdfcf8;
  --surface: #ffffff;
  --ink: #1f1a14;
  --muted: #5c554b;
  --saffron: #f6c544;
  --saffron-soft: #fdf0c8;
  --logo-red: #e9462e;
  --ship-bg: #fcd805;
  --ship-ink: #8f2410;
  --chili: #c2361d;
  --chili-ink: #9c2a15;
  --sea: #0f6b63;
  --sea-ink: #ffffff;
  --line: #e7e1d3;
  --pending: #fff1c2;
  --pending-ink: #7a5a00;
  --display: "Baloo 2", "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120e; --surface: #1f1a14; --ink: #f3ece0; --muted: #c2b8a8;
    --saffron: #e0ad2e; --saffron-soft: #2c2412; --logo-red: #ff7a5c; --chili: #ef6a4c; --chili-ink: #f59a80;
    --sea: #13867c; --sea-ink: #ffffff; --line: #3a3229;
    --pending: #3a3115; --pending-ink: #f3d77a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15120e; --surface: #1f1a14; --ink: #f3ece0; --muted: #c2b8a8;
  --saffron: #e0ad2e; --saffron-soft: #2c2412; --logo-red: #ff7a5c; --chili: #ef6a4c; --chili-ink: #f59a80;
  --sea: #13867c; --sea-ink: #ffffff; --line: #3a3229;
  --pending: #3a3115; --pending-ink: #f3d77a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 860px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--chili-ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; color: var(--chili-ink); }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -0.01em; color: var(--logo-red); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 700; color: var(--chili); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 28px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--chili-ink); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Đầu trang */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-logo { width: 48px; height: 48px; flex: none; display: block; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text b { font-family: var(--display); font-size: 1.2rem; color: var(--logo-red); }
.brand-text span { font-size: 0.8rem; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; padding-block: 4px; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--chili); }
.head-cta { display: none; }

/* Nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; padding: 12px 20px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-main { background: var(--chili); color: #fff; }
.btn-main:hover { filter: brightness(1.06); }
.btn-line { background: transparent; color: var(--chili-ink); border-color: var(--chili-ink); }
.btn-sea { background: var(--sea); color: var(--sea-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Phần mở đầu trang chủ */
.hero { background: var(--saffron-soft); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; gap: 28px; padding-block: 36px 40px; align-items: center; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; padding-block: 52px; } }
.hero-copy { display: grid; gap: 16px; min-width: 0; }
.hero-copy h1 em { font-style: normal; color: var(--sea); }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hero-points li { padding-left: 26px; position: relative; }
.hero-points li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--chili); }
.hero-photo { position: relative; max-width: 460px; justify-self: center; width: 100%; }
.hero-photo img { border-radius: 22px; background: var(--surface); box-shadow: 14px 14px 0 var(--saffron); aspect-ratio: 1; object-fit: cover; width: 100%; }
.price-tag { position: absolute; right: 0; bottom: 6%; background: var(--sea); color: var(--sea-ink); border-radius: 14px; padding: 10px 14px; line-height: 1.2; transform: rotate(-4deg); }
.price-tag b { display: block; font-family: var(--display); font-size: 1.5rem; }
.price-tag span { font-size: 0.8rem; }

/* Dải chữ chạy giống dải xanh dưới nhãn hũ */
.label-band { background: var(--sea); color: var(--sea-ink); overflow: hidden; }
.label-band ul { list-style: none; margin: 0; padding: 10px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; font-weight: 600; font-size: 0.95rem; }
.label-band li { padding-inline: 14px; }
.label-band li + li::before { content: "★"; margin-right: 14px; color: var(--saffron); }

/* Khối nội dung */
section.band { padding-block: 48px; }
section.band.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; margin-bottom: 24px; max-width: 64ch; }
.grid-2 { display: grid; gap: 24px; align-items: start; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2 > * { min-width: 0; }
.photo { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.photo img { width: 100%; }
.photo figcaption { padding: 10px 14px; font-size: 0.88rem; color: var(--muted); }
figure { margin: 0; }
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gallery .photo img { aspect-ratio: 3 / 4; object-fit: cover; }

/* Đánh giá của khách */
.rating-line { font-size: 0.98rem; }
.stars { color: var(--chili); letter-spacing: 0.05em; }
.reviews { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.review { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: grid; gap: 12px; align-content: space-between; min-width: 0; }
.review p { font-size: 1.02rem; }
.review p::before { content: "“"; font-family: var(--display); font-size: 2rem; line-height: 0; vertical-align: -0.45em; margin-right: 4px; color: var(--chili); }
.review footer { font-size: 0.85rem; color: var(--muted); }

/* Mặt sau nhãn: thành phần, hạn dùng */
.label-card { background: var(--surface); border: 2px solid var(--chili-ink); border-radius: 6px; padding: 18px 20px; display: grid; gap: 0; font-size: 0.98rem; }
.label-card h3 { font-family: var(--body); font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding-bottom: 8px; border-bottom: 6px solid var(--chili-ink); }
.label-card dl { margin: 0; display: grid; }
.label-card .row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.label-card .row:last-child { border-bottom: 0; }
.label-card dt { font-weight: 700; }
.label-card dd { margin: 0; min-width: 0; }
.label-card .src { font-size: 0.82rem; color: var(--muted); padding-top: 10px; border-top: 3px solid var(--chili-ink); }

/* Dải số liệu bán hàng */
.proof { background: var(--surface); border-bottom: 1px solid var(--line); }
.proof .wrap:first-child { display: grid; gap: 12px 24px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding-block: 22px 6px; }
.stat { display: grid; gap: 2px; min-width: 0; }
.stat b { font-family: var(--display); font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); font-weight: 800; line-height: 1.05; color: var(--chili-ink); font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.9rem; color: var(--muted); }
.proof-src { font-size: 0.78rem; color: var(--muted); padding-block: 4px 14px; margin: 0 auto; }

/* Đồng hồ theo giờ mở cửa */
.countdown { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.92rem; justify-self: start; }
.countdown::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--sea); flex: none; }
.countdown b { font-variant-numeric: tabular-nums; color: var(--chili-ink); }

/* Dải ưu đãi trên cùng */
.topbar { background: var(--chili); color: #fff; font-size: 0.88rem; font-weight: 600; text-align: center; }
.topbar .wrap { padding-block: 7px; }

/* Nút Zalo nổi trên máy tính */
.float-zalo { display: none; }
@media (min-width: 860px) { .float-zalo { display: inline-flex; position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 20; box-shadow: 0 6px 18px rgba(31, 26, 20, 0.22); } }

/* Nhãn trên thẻ gói */
.badge { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--chili); color: #fff; font-weight: 700; font-size: 0.78rem; padding: 4px 10px; border-radius: 999px; }
.badge-sea { background: var(--sea); color: var(--sea-ink); }

/* Nhãn FREE SHIP: nền vàng logo, chữ đỏ đậm (cặp màu cố định, đọc tốt ở cả nền sáng và tối) */
.freeship { display: inline-block; background: var(--ship-bg); color: var(--ship-ink); font-family: var(--display); font-weight: 800; font-size: 0.82em; letter-spacing: 0.04em; line-height: 1.25; padding: 2px 10px 1px; border-radius: 999px; vertical-align: 0.1em; white-space: nowrap; }
.badge-ship { background: var(--ship-bg); color: var(--ship-ink); font-size: 0.85rem; letter-spacing: 0.04em; box-shadow: 0 2px 6px rgba(31, 26, 20, 0.18); }
.pack-hot { border: 2px solid var(--logo-red); box-shadow: 0 8px 22px rgba(233, 70, 46, 0.18); }

/* Danh sách quy cách */
.packs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.pack { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.pack img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.pack-body { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.pack-body .price { font-family: var(--display); font-size: 1.35rem; font-weight: 800; color: var(--chili-ink); font-variant-numeric: tabular-nums; }

/* Bảng */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 520px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }

/* So sánh 2 món */
.versus { display: grid; gap: 16px; }
@media (min-width: 700px) { .versus { grid-template-columns: 1fr 1fr; } }
.versus article { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.versus article.pick { border: 2px solid var(--chili); }
.versus ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Câu hỏi thường gặp */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding-block: 14px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.4rem; line-height: 1; color: var(--chili); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 16px; color: var(--muted); display: grid; gap: 8px; }
.alt .faq details, .alt .pack, .alt .versus article { background: var(--bg); }

/* Các bước */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ol.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 58px; position: relative; }
ol.steps li::before { content: counter(s); position: absolute; left: 16px; top: 13px; width: 30px; height: 30px; border-radius: 50%; background: var(--saffron); color: #1f1a14; font-weight: 800; display: grid; place-items: center; }

/* Ô chờ chốt (bản nháp) */
.pending { background: var(--pending); color: var(--pending-ink); border-radius: 6px; padding: 1px 7px; font-size: 0.85rem; font-weight: 700; }
.pending-box { background: var(--pending); color: var(--pending-ink); border-radius: 12px; padding: 14px 16px; font-size: 0.95rem; }

/* Mẫu tạo tin nhắn đặt hàng */
form.order { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
form.order label { display: grid; gap: 4px; font-weight: 600; font-size: 0.95rem; min-width: 0; }
form.order .full { grid-column: 1 / -1; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); width: 100%; }
textarea { min-height: 90px; resize: vertical; }
#msg-out { white-space: pre-wrap; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; font-size: 0.95rem; }

/* Ô liên hệ */
.contact-box { background: var(--sea); color: var(--sea-ink); border-radius: 18px; padding: 24px; display: grid; gap: 12px; }
.contact-box a { color: var(--sea-ink); }
.contact-box .big { font-family: var(--display); font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.contact-box .btn-main { background: var(--saffron); color: #1f1a14; }
.contact-box .btn-line { color: var(--sea-ink); border-color: var(--sea-ink); }

/* Đường dẫn vị trí */
.crumbs { font-size: 0.88rem; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }
.page-head { padding-block: 18px 32px; display: grid; gap: 12px; }

/* Chân trang */
.site-foot { margin-top: 24px; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.93rem; }
.site-foot .wrap { padding-block: 28px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-foot h4 { color: var(--chili-ink); margin: 0 0 6px; font-size: 1rem; font-family: var(--display); }
.site-foot p { margin: 0 0 4px; }
.site-foot .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; font-size: 0.85rem; }

/* Thanh đặt hàng cố định trên điện thoại */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.dock .btn { width: 100%; padding-block: 12px; }
@media (min-width: 860px) { .dock { display: none; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Thanh "còn bao nhiêu nữa là FREE SHIP" trong mẫu đặt hàng */
.ship-meter { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.sm-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; font-size: 0.95rem; }
.sm-row b { font-variant-numeric: tabular-nums; color: var(--chili-ink); font-size: 1.05rem; }
.sm-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.sm-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--logo-red), var(--ship-bg)); transition: width 0.3s ease; }
.sm-note { font-size: 0.9rem; color: var(--muted); }
.sm-note b { color: var(--chili-ink); font-variant-numeric: tabular-nums; }
.save { font-size: 0.88rem; font-weight: 700; color: var(--sea); }

/* Bảng bật lên đánh giá thật */
.proof-toast { position: fixed; z-index: 25; left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); width: min(360px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: flex-start; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(31, 26, 20, 0.2); padding: 12px 34px 12px 12px; font-size: 0.88rem; opacity: 0; transform: translateY(14px); transition: opacity 0.35s ease, transform 0.35s ease; }
.proof-toast[hidden] { display: none; }
.proof-toast.show { opacity: 1; transform: none; }
.proof-toast img { width: 32px; height: 32px; flex: none; }
.pt-body { display: grid; gap: 3px; min-width: 0; }
.pt-head { font-weight: 700; color: var(--chili-ink); }
.pt-src { font-size: 0.76rem; color: var(--muted); }
.pt-close { position: absolute; top: 4px; right: 6px; background: none; border: 0; font-size: 1.2rem; line-height: 1; padding: 4px 6px; cursor: pointer; color: var(--muted); }
@media (min-width: 860px) { .proof-toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .proof-toast { transition: none; transform: none; } }
/* Thông báo sau khi bấm Đặt đơn */
.order-status { border-radius: 10px; padding: 12px 14px; font-size: 0.95rem; }
.order-status[hidden] { display: none; }
.order-status.ok { background: var(--sea); color: var(--sea-ink); }
.order-status.warn { background: var(--pending); color: var(--pending-ink); }
.btn:disabled { opacity: 0.7; cursor: progress; }