/* =========================================================
   TRĂNG VIỆT — Quà Trung Thu & Ô Mai
   ========================================================= */

:root {
  --red-deep: #7a1620;
  --red: #9c2530;
  --red-light: #c94b3f;
  --gold: #d4a933;
  --gold-light: #f2d98a;
  --cream: #fff8ec;
  --cream-dark: #f7ead0;
  --brown: #3b2416;
  --brown-soft: #6b5140;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(122, 22, 32, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Be Vietnam Pro", Roboto, Arial, sans-serif;
  color: var(--brown);
  background: var(--cream);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 { font-family: "Georgia", "Be Vietnam Pro", serif; margin: 0 0 12px; color: var(--red-deep); }

section { padding: 64px 0; }

.section-tag {
  display: inline-block;
  background: var(--gold-light);
  color: var(--red-deep);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head p { color: var(--brown-soft); font-size: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--red-light), var(--red-deep)); color: var(--white); box-shadow: 0 8px 20px rgba(156,37,48,.35); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(156,37,48,.45); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--red-deep); box-shadow: 0 8px 20px rgba(212,169,51,.35); }
.btn-outline { background: transparent; border-color: var(--red-deep); color: var(--red-deep); }
.btn-outline:hover { background: var(--red-deep); color: var(--white); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--red-deep);
  color: var(--gold-light);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
}
.topbar .countdown { display: inline-flex; gap: 6px; margin-left: 10px; font-variant-numeric: tabular-nums; }
.topbar .countdown span { background: rgba(255,255,255,.12); border-radius: 6px; padding: 2px 7px; }

/* ---------- Header ---------- */
header.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,248,236,.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--cream-dark);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--red-deep); }
.logo .moon { width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold) 60%, #b8860b); box-shadow: 0 0 0 4px rgba(212,169,51,.15); }
.logo small { display: block; font-size: 11px; font-weight: 500; color: var(--brown-soft); letter-spacing: .05em; }

nav.main-nav ul { display: flex; gap: 28px; }
nav.main-nav a { font-weight: 600; color: var(--brown); font-size: 15px; transition: color .15s; }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--red); }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--white); border: 1px solid var(--cream-dark); display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; }
.cart-count { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { width: 24px; height: 2px; background: var(--brown); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at 85% 20%, rgba(212,169,51,.25), transparent 55%),
              linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  padding: 70px 0 50px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 44px; line-height: 1.2; margin-bottom: 18px; }
.hero h1 .accent { color: var(--red); position: relative; }
.hero p.lead { font-size: 17px; color: var(--brown-soft); margin-bottom: 28px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--brown-soft); font-weight: 600; }
.hero-trust span { display: flex; align-items: center; gap: 6px; }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.moon-badge {
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3cf, var(--gold-light) 45%, var(--gold) 80%);
  box-shadow: 0 30px 60px rgba(122,22,32,.25), inset 0 0 40px rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 130px;
  position: relative;
}
.moon-badge::after {
  content: "";
  position: absolute; inset: -18px;
  border-radius: 50%;
  border: 2px dashed rgba(122,22,32,.25);
}
.float-card {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.float-card.c1 { top: 6%; left: -6%; }
.float-card.c2 { bottom: 10%; right: -8%; }

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--red-deep); color: var(--gold-light); padding: 18px 0; }
.trust-strip .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 14px; font-weight: 600; }
.trust-strip span { display: flex; align-items: center; gap: 8px; }

/* ---------- Pain points ---------- */
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pain-card { background: var(--white); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); border-top: 4px solid var(--red); }
.pain-card .emoji { font-size: 34px; margin-bottom: 14px; }
.pain-card h3 { font-size: 18px; }
.pain-card p { color: var(--brown-soft); font-size: 14.5px; margin: 0; }

.quote-banner { text-align: center; max-width: 720px; margin: 46px auto 0; font-size: 19px; font-style: italic; color: var(--red-deep); font-family: Georgia, serif; }

/* ---------- Product grid ---------- */
.filter-tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: 34px; flex-wrap: wrap; }
.filter-tabs button {
  background: var(--white); border: 1.5px solid var(--cream-dark); color: var(--brown-soft);
  padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; transition: all .15s;
}
.filter-tabs button.active, .filter-tabs button:hover { background: var(--red-deep); color: #fff; border-color: var(--red-deep); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 18px 36px rgba(122,22,32,.18); }
.product-thumb {
  height: 170px; display: flex; align-items: center; justify-content: center; font-size: 72px;
  background: linear-gradient(135deg, var(--cream-dark), var(--gold-light));
  cursor: pointer;
}
.product-badge {
  position: absolute; top: 12px; left: 12px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase;
}
.product-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h4 { font-size: 15.5px; margin: 0; color: var(--brown); cursor: pointer; min-height: 40px; }
.product-body .desc { font-size: 12.5px; color: var(--brown-soft); min-height: 32px; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-weight: 800; color: var(--red-deep); font-size: 17px; }
.price-old { text-decoration: line-through; color: #b3a48f; font-size: 13px; }
.product-actions { display: flex; gap: 8px; margin-top: 10px; }
.product-actions .btn { flex: 1; padding: 10px 12px; font-size: 13.5px; }

.view-more-wrap { text-align: center; margin-top: 40px; }

/* ---------- Features (why choose us) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature-card .icon { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, var(--gold-light), var(--gold)); display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 16px; }
.feature-card h3 { font-size: 17px; }
.feature-card p { font-size: 14px; color: var(--brown-soft); margin: 0; }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testi-card { background: var(--white); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.testi-card .stars { color: var(--gold); margin-bottom: 10px; letter-spacing: 2px; }
.testi-card p.quote { font-size: 14.5px; color: var(--brown-soft); font-style: italic; }
.testi-user { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.testi-user .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gold-light); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--red-deep); }
.testi-user strong { display: block; font-size: 14px; }
.testi-user span { font-size: 12px; color: var(--brown-soft); }

/* ---------- Offer banner ---------- */
.offer-banner {
  background: linear-gradient(135deg, var(--red-deep), var(--red));
  color: #fff; border-radius: 24px; padding: 48px 40px; text-align: center;
  box-shadow: var(--shadow);
}
.offer-banner h2 { color: #fff; }
.offer-banner p { color: var(--gold-light); max-width: 560px; margin: 0 auto 26px; }
.offer-timer { display: flex; justify-content: center; gap: 14px; margin-bottom: 28px; }
.offer-timer .block { background: rgba(255,255,255,.12); border-radius: 12px; padding: 14px 18px; min-width: 74px; }
.offer-timer .block b { display: block; font-size: 26px; }
.offer-timer .block span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- FAQ ---------- */
.faq-item { background: var(--white); border-radius: var(--radius-sm); margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.faq-q { padding: 18px 22px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 15px; }
.faq-a { padding: 0 22px; max-height: 0; overflow: hidden; transition: all .25s ease; color: var(--brown-soft); font-size: 14.5px; }
.faq-item.open .faq-a { padding-bottom: 18px; max-height: 240px; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-q .chev { transition: transform .2s; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--brown); color: #f2e8d8; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 36px; }
.footer-grid h4 { color: var(--gold-light); font-size: 15px; margin-bottom: 16px; }
.footer-grid p, .footer-grid li { font-size: 13.5px; color: #d8c9b3; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; text-align: center; font-size: 13px; color: #b8a888; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: #fff; box-shadow: 0 -6px 20px rgba(0,0,0,.1);
  padding: 10px 16px; display: none; gap: 10px;
}
.sticky-cta .btn { flex: 1; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { background: var(--cream-dark); padding: 46px 0; text-align: center; }
.page-hero .crumb { font-size: 13px; color: var(--brown-soft); margin-top: 8px; }
.page-hero .crumb a { color: var(--red); font-weight: 600; }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.cart-table { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 70px 2fr 1fr auto auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--cream-dark); }
.cart-row:last-child { border-bottom: none; }
.cart-row .thumb { width: 60px; height: 60px; border-radius: 10px; background: linear-gradient(135deg, var(--cream-dark), var(--gold-light)); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.cart-row .name { font-weight: 700; font-size: 14.5px; }
.cart-row .name span { display: block; font-size: 12px; color: var(--brown-soft); font-weight: 400; margin-top: 2px; }
.qty-box { display: flex; align-items: center; border: 1px solid var(--cream-dark); border-radius: 999px; overflow: hidden; width: fit-content; }
.qty-box button { width: 30px; height: 30px; border: none; background: var(--cream); cursor: pointer; font-size: 15px; font-weight: 700; }
.qty-box input { width: 34px; border: none; text-align: center; font-weight: 700; }
.remove-btn { background: none; border: none; color: var(--red); cursor: pointer; font-size: 18px; }
.subtotal { font-weight: 800; color: var(--red-deep); }

.summary-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.summary-card h3 { font-size: 18px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14.5px; margin-bottom: 12px; color: var(--brown-soft); }
.summary-row.total { font-size: 19px; font-weight: 800; color: var(--red-deep); border-top: 1px dashed var(--cream-dark); padding-top: 14px; margin-top: 4px; }
.empty-cart { text-align: center; padding: 60px 20px; }
.empty-cart .emoji { font-size: 60px; margin-bottom: 16px; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
.form-card, .pay-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--cream-dark); font-size: 14.5px; font-family: inherit; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pay-option { border: 1.5px solid var(--cream-dark); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; cursor: pointer; }
.pay-option.selected { border-color: var(--red); background: #fff7f2; }
.pay-option label { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.pay-detail { display: none; margin-top: 12px; padding: 14px; background: var(--cream); border-radius: 10px; font-size: 13.5px; color: var(--brown-soft); }
.pay-option.selected .pay-detail { display: block; }
.qr-box { width: 160px; height: 160px; margin: 10px auto; background: var(--white); border: 1px dashed var(--brown-soft); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; text-align: center; color: var(--brown-soft); padding: 8px; }

/* ---------- Thank you page ---------- */
.thankyou { text-align: center; padding: 80px 0; }
.thankyou .check { width: 90px; height: 90px; border-radius: 50%; background: var(--gold-light); display: flex; align-items: center; justify-content: center; font-size: 46px; margin: 0 auto 24px; }
.order-code { display: inline-block; background: var(--cream-dark); padding: 8px 20px; border-radius: 999px; font-weight: 800; color: var(--red-deep); margin: 14px 0 26px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 90px; right: 24px; z-index: 200;
  background: var(--brown); color: #fff; padding: 14px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); transform: translateX(140%); transition: transform .3s ease;
}
.toast.show { transform: translateX(0); }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(59,36,22,.55); display: none; align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal-box { background: var(--white); border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 30px; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--cream); border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.modal-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; }
.modal-grid .thumb { height: 200px; border-radius: 14px; background: linear-gradient(135deg, var(--cream-dark), var(--gold-light)); display: flex; align-items: center; justify-content: center; font-size: 90px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .pain-grid, .feature-grid, .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  nav.main-nav { position: fixed; top: 68px; left: 0; right: 0; background: var(--cream); flex-direction: column; padding: 20px; box-shadow: var(--shadow); transform: translateY(-150%); transition: transform .25s ease; }
  nav.main-nav.open { transform: translateY(0); }
  nav.main-nav ul { flex-direction: column; gap: 18px; }
  .hamburger { display: flex; }
  .hero h1 { font-size: 30px; }
  .moon-badge { width: 220px; height: 220px; font-size: 80px; }
  .pain-grid, .feature-grid, .testi-grid, .product-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .sticky-cta { display: flex; }
  body { padding-bottom: 70px; }
  .cart-row { grid-template-columns: 50px 1fr; }
  .cart-row .qty-box, .cart-row .subtotal, .cart-row .remove-btn { grid-column: 2; }
}
@media (max-width: 480px) {
  .product-grid, .pain-grid, .feature-grid, .testi-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
}
