:root {
  /* Bảng màu thương hiệu TeaGo: nâu - cam - xanh lá trà - nền kem */
  --bg: #fdf4e3;
  --card: #fffaf0;
  --brand: #4a2511;
  --brand-dark: #331708;
  --orange: #e07b1c;
  --orange-dark: #b85c0d;
  --leaf: #6b7a2c;
  --line: #e3cfa9;
  --text: #3a1f0e;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container { width: min(1000px, 92%); margin: 0 auto; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; padding: 10px 0; }
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; line-height: 1;
}
.logo img { display: block; height: auto; }
.logo .logo-img { width: 120px; }
.logo-crop { display: block; height: auto; aspect-ratio: 1536 / 760; object-fit: cover; object-position: top; mix-blend-mode: multiply; }
.hero-title { margin: 0; line-height: 0; }
.hero-title img { display: block; width: min(440px, 90%); height: auto; margin: 0 auto; }
.footer-word { display: block; width: 150px; height: auto; margin: 0 auto; }
.nav { flex: 1; display: flex; gap: 18px; }
.nav a { color: var(--brand); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--orange-dark); }
.cart-btn {
  background: var(--orange-dark); color: #fff; border: 0;
  padding: 8px 14px; border-radius: 999px; font-weight: 600;
}
.cart-btn:hover { background: var(--brand); }
.badge {
  background: #fff; color: var(--brand); border-radius: 999px;
  padding: 0 8px; margin-left: 4px; font-weight: 700;
}

/* Hero */
.hero { text-align: center; padding: 48px 0 40px; }
.hero-logo { display: block; width: 92px; height: auto; margin: 0 auto 6px; }
.hero h1 {
  margin: 0; font-family: "Baloo 2", Fredoka, "Arial Rounded MT Bold", "Trebuchet MS", Verdana, sans-serif;
  font-size: 4rem; font-weight: 800; line-height: 1.05; letter-spacing: 1px;
}
.script { font-family: "Brush Script MT", cursive; font-size: 1.8rem; color: var(--brand); margin: 0 0 12px; }
.hero h1 .script { display: block; letter-spacing: normal; font-weight: 400; font-size: 1.5rem; }
.tagline {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 8px auto 14px; font-style: italic; font-size: 1.15rem; color: var(--brand);
}
.tagline::before, .tagline::after { content: ""; width: 44px; height: 2px; background: var(--orange); }
.lead { margin: 0 auto 18px; max-width: 560px; }
.page-title {
  text-align: center; font-family: Georgia, serif; color: var(--brand);
  font-size: 1.6rem; margin: 0 0 18px;
}
.about { padding: 10px 0 40px; }
.about h2 { font-family: Georgia, serif; color: var(--brand); font-size: 1.4rem; margin: 0 0 10px; }
.about p { margin: 0 0 10px; max-width: 760px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff;
  padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn {
  display: inline-block; background: var(--orange-dark); color: #fff;
  border: 0; padding: 11px 24px; border-radius: 999px;
  text-decoration: none; font-weight: 600;
}
.btn:hover { background: var(--brand); }
.btn.full { width: 100%; margin-top: 14px; }

/* Tabs */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px; }
.tab {
  border: 1px solid var(--brand); background: transparent; color: var(--brand);
  padding: 7px 18px; border-radius: 999px; font-weight: 600;
}
.tab.active { background: var(--brand); color: #fff; }

/* Menu */
.section { margin-bottom: 30px; }
.section-title {
  display: inline-block; font-family: "Brush Script MT", cursive;
  font-size: 1.7rem; padding: 4px 26px; border-radius: 50%;
  border: 2px solid var(--orange); color: var(--brand); margin: 0 0 12px;
  transform: rotate(-3deg);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.card h3, .card h4 { margin: 0; color: var(--brand); font-size: 1.05rem; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 300 / 220; object-fit: cover; border-radius: 8px; background: var(--bg); }
.price { font-size: .92rem; }
.price span { margin-right: 14px; }
.card .btn { margin-top: auto; padding: 8px 14px; font-size: .9rem; align-self: flex-start; }
.topping-note { margin: 10px 0 40px; padding: 14px 18px; border: 1px solid var(--brand); border-radius: 10px; }

/* Footer */
.footer { text-align: center; padding: 30px 0; border-top: 2px solid var(--brand); color: var(--brand); }
.footer h2 { margin: 0; font-family: "Baloo 2", Fredoka, "Arial Rounded MT Bold", "Trebuchet MS", Verdana, sans-serif; font-size: 2rem; font-weight: 800; letter-spacing: 1px; }
.footer p { margin: 4px 0; font-size: .9rem; }

/* Modal */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal {
  background: var(--card); border-radius: 14px; padding: 22px;
  width: min(420px, 100%); max-height: 90vh; overflow: auto; position: relative;
}
.modal.center { text-align: center; }
.modal h3 { margin-top: 0; color: var(--brand); }
.close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 1.6rem; color: var(--brand); }
.label { font-weight: 600; margin: 12px 0 6px; }
.options { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
  border: 1px solid var(--brand); background: #fff; color: var(--brand);
  padding: 6px 14px; border-radius: 999px;
}
.opt.active { background: var(--brand); color: #fff; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.qty { display: flex; align-items: center; gap: 12px; }
.qty button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--brand); background: #fff; color: var(--brand);
}

form label { display: block; font-weight: 600; margin-top: 10px; font-size: .9rem; }
form input, form textarea, form select {
  width: 100%; margin-top: 4px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
}
.error { color: #c00; min-height: 1.2em; margin: 8px 0 0; font-size: .85rem; }
.total-row { display: flex; justify-content: space-between; margin-top: 10px; }

/* Drawer */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100%);
  background: var(--card); z-index: 40; box-shadow: -4px 0 20px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
}
.drawer-head { padding: 14px 18px; border-bottom: 1px solid var(--line); position: relative; }
.drawer-head h3 { margin: 0; color: var(--brand); }
.drawer-body { flex: 1; overflow: auto; padding: 10px 18px; }
.drawer-foot { padding: 14px 18px; border-top: 1px solid var(--line); }
.cart-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cart-item .top { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.cart-item .sub { font-size: .82rem; opacity: .8; }
.cart-item .row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.remove { border: 0; background: none; color: var(--brand); text-decoration: underline; font-size: .82rem; }
.empty { text-align: center; padding: 40px 0; opacity: .7; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 80px);
  background: var(--brand); color: #fff; padding: 10px 20px; border-radius: 999px;
  transition: transform .3s; z-index: 60;
}
.toast.show { transform: translate(-50%, 0); }

/* Khung thanh toán QR */
.pay-box { margin: 14px 0; padding: 14px; border: 1px dashed var(--brand); border-radius: 12px; background: #fff; text-align: left; }
.pay-title { margin: 0 0 8px; font-weight: 700; color: var(--brand); text-align: center; }
.pay-box .qr { width: min(220px, 70%); margin: 0 auto 10px; }
.pay-box .qr svg { display: block; width: 100%; height: auto; }
.pay-info { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.pay-info li { margin: 3px 0; }
.pay-note { margin: 10px 0 0; font-size: .82rem; opacity: .85; }

@media (max-width: 560px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .hero h1 { font-size: 2.6rem; }
}
