/* Khuôn chung cho mọi tiệm. Màu chính (--brand) lấy từ brandColor trong tiem.json */
:root {
  --bg: #F5F6F4;
  --surface: #FFFFFF;
  --ink: #1C2420;
  --muted: #66716C;
  --line: #E1E5E2;
  --brand: #1F7A5A;
  --brand-dark: #1C2420;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, white);
  --radius: 16px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero.no-img .hero-text { padding-top: 28px; }
#search { margin-bottom: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.chip {
  flex: 0 0 auto; font: inherit; font-size: 0.88rem; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:focus-visible, .qty button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 1px 8px; border-radius: 999px; vertical-align: 2px; }
.empty-result { color: var(--muted); text-align: center; padding: 16px 0; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  line-height: 1.55;
  padding-bottom: 88px;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
h1, h2 { font-family: 'Lora', Georgia, serif; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 1.75rem; margin-bottom: 14px; }
section { padding: 28px 0 8px; }

.preview-bar { background: #FDE68A; color: #713F12; text-align: center; font-size: 0.85rem; font-weight: 600; padding: 8px 16px; }

/* Hero */
.hero { position: relative; }
.hero-img { width: 100%; height: 260px; object-fit: cover; object-position: center 75%; display: block; }
.hero-text { padding-top: 0; position: relative; }
.logo { width: 96px; height: 96px; border-radius: 50%; display: block; margin: -48px 0 10px; border: 4px solid var(--bg); background: var(--bg); position: relative; }
.hero h1 { font-size: 2.1rem; color: var(--brand-dark); margin-bottom: 4px; }
.tagline { font-size: 1.1rem; font-weight: 700; margin: 0 0 8px; }
.intro { color: var(--muted); margin: 0 0 14px; }
.slogan { font-family: 'Lora', Georgia, serif; font-style: italic; color: var(--brand); margin: -6px 0 14px; }
.notices { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.notices li { background: var(--brand-soft); color: var(--brand); font-size: 0.85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; }

/* Products */
.products { display: grid; gap: 12px; }
.product { display: grid; grid-template-columns: 96px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.product.in-cart { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.product-img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: var(--brand-soft); }
.product-img.placeholder { display: grid; place-items: center; font-size: 2rem; }
.product h3 { font-size: 1rem; margin: 0 0 2px; }
.product .desc { color: var(--muted); font-size: 0.86rem; margin: 0 0 8px; }
/* Điện thoại: giá 1 dòng, nút số lượng luôn nằm dưới — món nào cũng giống nhau */
.product-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.price { font-weight: 800; }
.price small { font-weight: 500; color: var(--muted); }
.qty { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.qty button {
  -webkit-appearance: none; appearance: none; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; margin: 0;
  border: none; border-radius: 50%; background: var(--surface); color: var(--brand);
  display: grid; place-items: center; font: inherit; font-size: 1.2rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.qty button.plus { background: var(--brand); color: #fff; }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }

/* Reviews */
/* Mỗi ảnh hiện trọn vẹn, không cắt; ảnh dọc quá dài thì thu nhỏ cho vừa màn hình */
.reviews { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.reviews a {
  flex: 0 0 85%; max-width: 360px; height: 400px; scroll-snap-align: start;
  display: flex; align-items: center; justify-content: center;
  background: #000; border-radius: 12px; overflow: hidden;
}
.reviews img { max-width: 100%; max-height: 100%; display: block; }

/* Hỏi đáp */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.faq summary { font-weight: 600; padding: 14px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq-a { color: var(--muted); margin: -4px 0 14px; }
.faq-a p { margin: 0 0 10px; }
.faq-a p:last-child, .faq-a ul:last-child { margin-bottom: 0; }
.faq-a ul { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.faq-a li { background: var(--bg); border-radius: 10px; padding: 8px 12px; color: var(--ink); }

/* Checkout */
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; font-size: 0.95rem; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.summary .total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; font-weight: 800; }
.summary .empty { color: var(--muted); }
label { display: block; font-weight: 600; font-size: 0.92rem; margin: 0 0 6px; }
input, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink); margin-bottom: 14px;
}
input:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.hint { color: var(--muted); font-size: 0.85rem; margin: -8px 0 14px; }
.hp { position: absolute; left: -9999px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff;
  border: none; border-radius: 999px; padding: 13px 24px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
form .btn { width: 100%; }
.btn:disabled { opacity: 0.6; }
.form-msg { font-weight: 600; margin: 10px 0 0; }
.form-msg.err { color: #B91C1C; }

.done { text-align: center; padding: 48px 0; }
.done-icon { font-size: 2.6rem; }

footer { color: var(--muted); font-size: 0.85rem; padding: 32px 16px; text-align: center; }
footer a { color: var(--brand); font-weight: 600; }

/* Thanh giỏ hàng dưới cùng */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 -6px 20px rgba(43, 26, 16, 0.08);
}
.cart-bar > div { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--muted); }
.cart-bar strong { font-size: 1.15rem; color: var(--ink); }

@media (min-width: 720px) {
  .hero-img { height: 340px; }
  .product-foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .cart-bar { left: 50%; transform: translateX(-50%); max-width: 720px; border-radius: 16px 16px 0 0; border: 1px solid var(--line); }
}
