/* Bảo Lão Lão — main.css. Mobile-first, tự viết tay, không CDN CSS.
   Palette từ demo: xanh thảo mộc #143627/#0c2218, kem #f8f1e5, vàng đồng #d49b3d, cam CTA #c86d28. */
:root {
  --green-950: #0c2218; --green-900: #143627; --green-800: #1b4332; --green-700: #2d6a4f;
  --cream-50: #fdfbf7; --cream-100: #f8f1e5; --cream-200: #efe2cc;
  --gold: #d49b3d; --gold-light: #e6b86a; --cta: #c86d28; --cta-dark: #a8571b;
  --ink: #1c2b22; --muted: #5c6b60; --line: #e3d9c2; --danger: #b3261e; --ok: #1e7a46;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream-50); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-800); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; color: var(--green-900); }
h1 { font-size: 1.9rem; margin: 0 0 .6rem; }
h2 { font-size: 1.55rem; margin: 0 0 .6rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.section { padding: 44px 0; }
.section-cream { background: var(--cream-100); }
.section-sub { color: var(--muted); max-width: 640px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--cta); margin: 0 0 .4rem; }
.lead { font-size: 1.08rem; color: #33463a; }
.muted { color: var(--muted); font-size: .92rem; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(12, 34, 24, .97); border-bottom: 1px solid rgba(212, 155, 61, .35); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream-100); }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--green-800); border: 1px solid var(--gold); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 1.3rem; }
.brand-name { display: block; font-family: var(--serif); font-weight: 700; letter-spacing: .08em; color: var(--gold-light); font-size: 1.05rem; line-height: 1.1; }
.brand-sub { display: block; font-size: .68rem; color: var(--cream-100); opacity: .85; }
.menu-btn { margin-left: auto; background: transparent; border: 1px solid rgba(212, 155, 61, .5); color: var(--cream-100); border-radius: 10px; padding: 8px 12px; font-size: 1.1rem; cursor: pointer; }
.main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--green-950); flex-direction: column; padding: 8px 16px 16px; gap: 4px; }
.main-nav.open { display: flex; }
.main-nav a { color: var(--cream-100); text-decoration: none; padding: 10px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.main-nav a.active { color: var(--gold-light); }
.header-actions { margin-left: auto; }
.menu-btn + .header-actions, .header-actions { margin-left: 0; }
.header-inner .header-actions { margin-left: auto; }
.cart-link { color: var(--cream-100); text-decoration: none; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.cart-count { display: inline-flex; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--cta); color: #fff; align-items: center; justify-content: center; font-size: .78rem; }
/* Buttons */
.btn { display: inline-block; text-decoration: none; border: 1px solid transparent; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 1rem; cursor: pointer; text-align: center; background: var(--green-900); color: #fff; }
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { background: var(--cta-dark); }
.btn-ghost { background: transparent; border-color: var(--gold); color: var(--green-900); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.hero-cta .btn { flex: 1 1 100%; }
@media (min-width: 640px) { .hero-cta .btn { flex: 0 1 auto; } }
/* Hero */
.hero { background: linear-gradient(180deg, var(--green-950), var(--green-900) 60%, var(--green-800)); color: var(--cream-100); padding: 40px 0 48px; }
.hero h1 { color: var(--cream-50); font-size: 2rem; }
.hero .lead { color: rgba(248, 241, 229, .9); }
.hero .eyebrow { color: var(--gold-light); }
.hero-grid { display: grid; gap: 28px; }
.hero-points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.hero-points li { background: rgba(12, 34, 24, .6); border: 1px solid rgba(212, 155, 61, .3); border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.hero-media img { border-radius: 18px; border: 2px solid rgba(212, 155, 61, .45); width: 100%; }
.img-note { font-size: .8rem; color: var(--muted); margin-top: 8px; }
.hero .img-note { color: rgba(248, 241, 229, .65); }
/* Product grid + cards */
.product-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 24px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 6px 18px rgba(12, 34, 24, .08); }
.product-card img { width: 100%; height: 208px; object-fit: cover; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.15rem; }
.card-body h3 a { text-decoration: none; color: var(--green-900); }
.pack { font-size: .82rem; color: var(--muted); margin: 0; }
.desc { margin: 0; font-size: .95rem; }
.ingredients { font-size: .88rem; background: var(--cream-100); border-radius: 10px; padding: 8px 10px; }
.ingredients summary { cursor: pointer; font-weight: 700; color: var(--cta); }
.price { font-size: 1.05rem; margin: auto 0 0; padding-top: 8px; }
.price strong { color: var(--cta); font-size: 1.3rem; }
.price del { color: var(--muted); font-size: .9rem; }
.price .unit { font-size: .85rem; color: var(--muted); }
.price-contact { color: var(--muted); font-weight: 700; }
.card-actions { display: flex; gap: 10px; margin-top: 10px; }
.card-actions .btn { flex: 1; padding: 11px 10px; font-size: .92rem; }
.out-stock { color: var(--danger); font-weight: 700; margin: 0; }
/* Trust / ingredients */
.trustbar { background: var(--cream-100); border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); }
.trust-grid { display: grid; gap: 16px; margin-top: 16px; }
.trust-grid h3 { margin: 0 0 4px; }
.ing-list { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 16px; }
.ing-list li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ing-list li span { display: block; font-size: .85rem; color: var(--muted); }
.empty-state { background: #fff; border: 1px dashed var(--gold); border-radius: var(--radius); padding: 20px; }
.empty-state ol { padding-left: 20px; }
/* Detail */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.detail-grid { display: grid; gap: 24px; }
.detail-grid img { border-radius: 16px; width: 100%; }
.check-list { list-style: none; padding: 0; }
.check-list li::before { content: "✓ "; color: var(--cta); font-weight: 700; }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.qty-row input { width: 84px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; }
/* FAQ */
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq-list summary { cursor: pointer; font-weight: 700; color: var(--green-900); }
.faq-list p { margin: 8px 0 0; }
/* Forms / cart / checkout */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; font-family: inherit; background: #fff; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.form-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c2; border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.cart-line .qty-ctl { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-line .qty-ctl button { width: 44px; height: 44px; min-width: 44px; border-radius: 9px; border: 1px solid var(--line); background: var(--cream-100); font-size: 1.1rem; cursor: pointer; }
.cart-total { font-size: 1.15rem; font-weight: 700; text-align: right; margin: 12px 0; }
.order-box { background: #fff; border: 2px solid var(--gold); border-radius: 16px; padding: 20px; }
.order-box .big-code { font-size: 1.5rem; font-weight: 800; color: var(--cta); letter-spacing: .04em; }
/* Footer / floating */
.site-footer { background: var(--green-950); color: rgba(248, 241, 229, .8); padding: 36px 0 20px; margin-top: 20px; }
.site-footer h2, .site-footer h3 { color: var(--gold-light); }
.site-footer a { color: var(--cream-100); }
.footer-grid { display: grid; gap: 24px; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 24px; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: .88rem; }
.final-cta { background: var(--green-900); color: var(--cream-100); text-align: center; }
.final-cta h2 { color: var(--gold-light); }
.final-cta .hero-cta { justify-content: center; }
.floating-chat { position: fixed; right: 14px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 50; }
.chat-btn { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .8rem; text-decoration: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.chat-zalo { background: #0068ff; }
.chat-mess { background: linear-gradient(135deg, #00b2ff, #006aff 50%, #9b00ff); }
.contact-list { list-style: none; padding: 0; display: grid; gap: 12px; }
/* TEAM H — anchor navigation (§3 CR): section không bị header sticky che
   khi cuộn tới qua anchor (kể cả khi trình duyệt tự nhảy tới hash lúc tải trang). */
section[id] { scroll-margin-top: 76px; }
.nav-cta { background: var(--cta); color: #fff !important; border-radius: 999px; padding: 8px 16px !important; font-weight: 800; }
.nav-cta:hover { background: var(--cta-dark); }
/* Nút giỏ ở header là <button> (mở drawer), không phải link sang trang khác. */
.cart-link { background: transparent; border: 1px solid rgba(212, 155, 61, .5); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.footer-cart-btn { background: none; border: 0; padding: 0; color: var(--cream-100); font: inherit; cursor: pointer; text-decoration: underline; }
/* Cart drawer (TEAM H, §4 CR) */
.drawer-overlay { position: fixed; inset: 0; background: rgba(12, 34, 24, .55); z-index: 70; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: var(--cream-50); z-index: 71; box-shadow: -8px 0 30px rgba(0, 0, 0, .3); transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column; }
.cart-drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-title { margin: 0; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--green-900); }
.drawer-head button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 1.1rem; cursor: pointer; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.drawer-foot { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: #fff; }
/* CTA đặt hàng dính đáy mobile (TEAM H, §3 CR) — chỉ hiện < 900px. */
.sticky-order-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 65; display: block; text-align: center; background: var(--cta); color: #fff; font-weight: 800; font-size: 1.05rem; text-decoration: none; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .25); }
.sticky-order-cta .cart-count { background: rgba(255, 255, 255, .25); }
@media (min-width: 900px) { .sticky-order-cta { display: none; } }
@media (max-width: 899px) { body { padding-bottom: 56px; } }
/* Chọn số lượng + giá combo trên thẻ sản phẩm (TEAM H, §4 CR) */
.card-qty { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.card-qty label { font-weight: 700; font-size: .92rem; }
.card-qty input { width: 84px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; }
.tier-note { font-size: .85rem; color: var(--cta); font-weight: 700; margin: 0; }
/* Bảng giá combo (section #gia-mua) */
.price-table { width: 100%; border-collapse: collapse; margin-top: 16px; background: #fff; border-radius: 12px; overflow: hidden; }
.price-table th, .price-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; font-size: .95rem; }
.price-table th { background: var(--cream-100); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--green-950); color: var(--cream-100); border: 1px solid var(--gold); padding: 12px 18px; border-radius: 12px; z-index: 60; max-width: calc(100vw - 32px); text-align: center; }
/* Content cards (công thức / bài viết) + đánh giá */
.card-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 24px; }
.content-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 6px 18px rgba(12, 34, 24, .08); }
.content-card img { width: 100%; height: 208px; object-fit: cover; }
.review-grid { display: grid; gap: 16px; margin-top: 16px; }
.review-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 16px; margin: 0; }
.review-card p { margin: 0 0 10px; font-style: italic; }
.review-card .stars { color: var(--gold); letter-spacing: .1em; }
.article-body img { border-radius: 12px; }
.article-body table { border-collapse: collapse; width: 100%; overflow-x: auto; display: block; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px; text-align: left; }
@media (min-width: 640px) { .card-grid { grid-template-columns: 1fr 1fr; } .review-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } .review-grid { grid-template-columns: repeat(3, 1fr); } }
/* Tablet + desktop */
@media (min-width: 640px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .ing-list { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.6rem; }
}
@media (min-width: 900px) {
  .menu-btn { display: none; }
  .main-nav { display: flex; position: static; flex-direction: row; background: transparent; padding: 0; gap: 22px; margin-left: auto; }
  .main-nav a { border: 0; padding: 4px 0; }
  .header-actions { margin-left: 0; }
  .hero-grid { grid-template-columns: 7fr 5fr; align-items: center; }
  .hero-points { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  h1 { font-size: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
