/* ==========================================================================
   ZenLife – Phú Định | Design tokens
   Ý tưởng: mặt nước tĩnh lặng về đêm — chàm sâu (#12263F) ánh lên vệt phản
   chiếu vàng đồng (khoáng chất/pH kiềm), điểm ngọc lục (sức khoẻ, OCOP).
   Kiểu chữ: serif có gờ nhẹ cho tiêu đề (gợi giấy chứng nhận/con dấu OCOP),
   sans hiện đại cho phần đọc, mono cho số liệu & mã truy xuất.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --ink:        #0E1D30;
  --navy:       #12263F;
  --navy-2:     #1F3864;
  --teal:       #1E5F5A;
  --gold:       #B8860B;
  --gold-soft:  #E8C468;
  --paper:      #F6F3EA;
  --paper-2:    #EDE7D6;
  --line:       rgba(18,38,63,0.12);
  --ok:         #2E7D5B;
  --warn:       #B8860B;
  --danger:     #B4432F;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 8px 24px rgba(14,29,48,0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 .5em; color: var(--navy); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
p { margin: 0 0 1em; }
.mono { font-family: var(--font-mono); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-tight { padding: 32px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.btn-primary { background: var(--navy); color: var(--paper); }
.btn-primary:hover { background: var(--navy-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #9c7209; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Top bar / Nav ---------- */
.topbar {
  background: var(--navy); color: rgba(246,243,234,0.75); font-size: 0.8rem;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; }

.navbar {
  background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--gold-soft), var(--gold) 55%, var(--teal) 130%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
}
.navlinks { display: flex; gap: 28px; align-items: center; }
.navlinks a { font-size: 0.92rem; font-weight: 500; color: var(--navy); position: relative; padding: 6px 0; }
.navlinks a.active, .navlinks a:hover { color: var(--gold); }
.navlinks a.active::after { content: ''; position: absolute; left:0; right:0; bottom:-2px; height:2px; background: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.icon-link { position: relative; display: inline-flex; padding: 6px; }
.badge {
  position: absolute; top: -2px; right: -2px; background: var(--gold); color: #fff;
  border-radius: 50%; font-size: 0.65rem; min-width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.mobile-toggle { display: none; }

@media (max-width: 860px) {
  .navlinks { position: fixed; inset: 72px 0 0 0; background: var(--paper); flex-direction: column;
    padding: 24px; gap: 18px; transform: translateX(100%); transition: transform .25s ease; overflow-y:auto; }
  .navlinks.open { transform: translateX(0); }
  .mobile-toggle { display: block; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--navy); }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at 75% -10%, rgba(184,134,11,0.18), transparent 55%),
    linear-gradient(180deg, var(--navy) 0%, #0E1D30 100%);
  color: var(--paper); position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; left:0; right:0; bottom:-1px; height: 90px;
  background: linear-gradient(180deg, transparent, var(--paper));
}
.hero .container { padding-top: 88px; padding-bottom: 120px; position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-soft); border: 1px solid rgba(232,196,104,0.4); padding: 6px 12px; border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lede { color: rgba(246,243,234,0.78); max-width: 46ch; font-size: 1.08rem; }
.hero-cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-stats .stat b { display:block; font-family: var(--font-display); font-size: 1.8rem; color: var(--gold-soft); }
.hero-stats .stat span { font-size: 0.82rem; color: rgba(246,243,234,0.65); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.product-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.product-media {
  aspect-ratio: 4/3; background: linear-gradient(160deg, var(--paper-2), #fff);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.bottle-illustration { width: 74px; height: 150px; position: relative; }
.bottle-illustration .body {
  position: absolute; inset: 26px 6px 0 6px; border-radius: 14px 14px 20px 20px;
  background: linear-gradient(160deg, rgba(30,95,90,0.18), rgba(184,134,11,0.16));
  border: 1.5px solid rgba(18,38,63,0.25);
}
.bottle-illustration .neck { position: absolute; top: 0; left: 27px; width: 20px; height: 30px; background: rgba(18,38,63,0.18); border-radius: 4px 4px 0 0; border: 1.5px solid rgba(18,38,63,0.25); border-bottom: none; }
.bottle-illustration .cap { position: absolute; top: -8px; left: 24px; width: 26px; height: 12px; background: var(--gold); border-radius: 3px; }
.bottle-illustration .label { position: absolute; left: 6px; right: 6px; top: 60px; height: 44px; background: rgba(255,255,255,0.88); border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); display:flex; align-items:center; justify-content:center; font-family: var(--font-mono); font-size: 0.55rem; color: var(--navy); letter-spacing: 0.05em;}

.product-body { padding: 20px; }
.product-body h3 { margin-bottom: 4px; font-size: 1.15rem; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 16px; }
.price-row .price { font-family: var(--font-mono); font-weight: 700; font-size: 1.25rem; color: var(--navy); }
.price-row .unit { font-size: 0.8rem; color: #666; }
.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qty-row input {
  width: 56px; text-align: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-mono);
}
.qty-btn { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); cursor: pointer; font-size: 1rem; }

/* ---------- Section headers ---------- */
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .eyebrow { color: var(--gold); border-color: rgba(184,134,11,0.35); }

/* ---------- Steps / numbered ---------- */
.steps { counter-reset: step; }
.step { display: flex; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: none; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--gold); padding-top: 3px; flex-shrink:0;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold);
}
.field-hint { font-size: 0.78rem; color: #777; margin-top: 4px; }
.form-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 32px; max-width: 480px; margin: 0 auto; box-shadow: var(--shadow); }

/* ---------- Alerts / badges ---------- */
.alert { padding: 14px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.9rem; }
.alert-ok { background: rgba(46,125,91,0.1); color: var(--ok); border: 1px solid rgba(46,125,91,0.25); }
.alert-warn { background: rgba(184,134,11,0.1); color: #8a6508; border: 1px solid rgba(184,134,11,0.25); }
.alert-danger { background: rgba(180,67,47,0.1); color: var(--danger); border: 1px solid rgba(180,67,47,0.25); }

.pill { display: inline-flex; align-items:center; padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.pill-navy { background: rgba(18,38,63,0.08); color: var(--navy); }
.pill-gold { background: rgba(184,134,11,0.14); color: #8a6508; }
.pill-ok { background: rgba(46,125,91,0.12); color: var(--ok); }

/* ---------- Table ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: #777; padding: 10px 12px; border-bottom: 2px solid var(--line); }
table.data td { padding: 12px; border-bottom: 1px solid var(--line); }
table.data tr:hover td { background: rgba(184,134,11,0.04); }

/* ---------- Tracking timeline ---------- */
.timeline { display: flex; justify-content: space-between; margin: 40px 0; position: relative; }
.timeline::before { content:''; position: absolute; top: 14px; left: 6%; right: 6%; height: 2px; background: var(--line); z-index:0; }
.tl-step { position: relative; z-index: 1; text-align: center; flex: 1; }
.tl-dot { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--line); margin: 0 auto 10px; display:flex; align-items:center; justify-content:center; font-size:0.8rem; color:#aaa; }
.tl-step.done .tl-dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.tl-step.current .tl-dot { background: var(--gold); border-color: var(--gold); color: #fff; }
.tl-label { font-size: 0.78rem; color: #666; }
.tl-step.done .tl-label, .tl-step.current .tl-label { color: var(--navy); font-weight: 600; }

/* ---------- Footer ---------- */
footer { background: var(--navy); color: rgba(246,243,234,0.7); padding: 56px 0 24px; margin-top: 80px; }
footer h4 { color: var(--gold-soft); font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
footer a { color: rgba(246,243,234,0.7); }
footer a:hover { color: var(--gold-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom { border-top: 1px solid rgba(246,243,234,0.12); margin-top: 40px; padding-top: 20px; font-size: 0.8rem; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }

/* ---------- Admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; background: var(--navy); color: rgba(246,243,234,0.85); flex-shrink: 0; padding: 24px 0; }
.admin-sidebar .brand { color: #fff; padding: 0 24px 24px; }
.admin-sidebar a { display: block; padding: 12px 24px; font-size: 0.9rem; color: rgba(246,243,234,0.7); }
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,0.06); color: #fff; border-left: 3px solid var(--gold); }
.admin-main { flex: 1; padding: 32px 40px; background: var(--paper); }
.admin-topbar { display:flex; justify-content:space-between; align-items:center; margin-bottom: 28px; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
@media (max-width: 960px) { .kpi-row { grid-template-columns: 1fr 1fr; } .admin-sidebar { display:none; } }
.kpi-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 20px; }
.kpi-card .label { font-size: 0.78rem; color: #777; text-transform: uppercase; letter-spacing: .04em; }
.kpi-card .value { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--navy); margin: 6px 0; }
.kpi-card .delta { font-size: 0.78rem; }
.kpi-card .delta.up { color: var(--ok); }
.kpi-card .delta.down { color: var(--danger); }
.panel { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 24px; margin-bottom: 24px; }
.panel h3 { font-size: 1.05rem; margin-bottom: 16px; }

/* ---------- QR / scan box ---------- */
.qr-box {
  background: #fff; border: 1.5px dashed var(--gold); border-radius: var(--radius-lg);
  padding: 40px; text-align: center; max-width: 480px; margin: 0 auto;
}
.qr-graphic {
  width: 120px; height: 120px; margin: 0 auto 20px; border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, var(--navy) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(90deg, var(--navy) 0 6px, transparent 6px 12px);
  background-blend-mode: multiply; opacity: 0.85;
}

/* ---------- Wallet ---------- */
.wallet-hero {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff; border-radius: var(--radius-lg); padding: 32px; margin-bottom: 28px;
}
.wallet-hero .balance { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; color: var(--gold-soft); }

/* ---------- Khung liên hệ nhanh nổi (Zalo/Chat/Call) ---------- */
.float-contact {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; flex-direction: column; gap: 10px;
}
.float-btn {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; box-shadow: 0 6px 18px rgba(14,29,48,0.25); transition: transform .15s ease;
  background: var(--navy); color: #fff;
}
.float-btn:hover { transform: scale(1.08); }
.float-zalo { background: #0068FF; }
.float-chat { background: var(--gold); }
.float-call { background: var(--teal); animation: pulse-call 2s infinite; }
@keyframes pulse-call {
  0%, 100% { box-shadow: 0 6px 18px rgba(14,29,48,0.25); }
  50% { box-shadow: 0 6px 18px rgba(30,95,90,0.55); }
}
@media (max-width: 600px) {
  .float-contact { right: 14px; bottom: 14px; }
  .float-btn { width: 46px; height: 46px; font-size: 1.2rem; }
}

/* ---------- Shopee-style vertical tracking timeline ---------- */
.track-wrap { position: relative; padding: 8px 0; }
.track-item { position: relative; display: flex; gap: 16px; padding-bottom: 26px; }
.track-item:last-child { padding-bottom: 0; }
.track-item::before {
  content: ''; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px;
  background: var(--line);
}
.track-item:last-child::before { display: none; }
.track-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
  background: #fff; border: 2px solid var(--line); color: #bbb;
}
.track-item.active .track-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.track-item.current .track-dot {
  background: var(--gold); border-color: var(--gold); color: #fff;
  box-shadow: 0 0 0 5px rgba(184,134,11,0.16);
}
.track-body { flex: 1; padding-top: 2px; }
.track-title { font-weight: 600; font-size: 0.95rem; color: #999; margin-bottom: 2px; }
.track-item.active .track-title { color: var(--ok); }
.track-item.current .track-title { color: var(--gold); font-weight: 700; }
.track-time { font-family: var(--font-mono); font-size: 0.78rem; color: #999; }
.track-desc { font-size: 0.86rem; color: #555; margin-top: 4px; line-height: 1.5; }
.track-loc { font-size: 0.8rem; color: #777; margin-top: 3px; }
.track-shipper {
  margin-top: 8px; padding: 10px 12px; background: var(--paper-2);
  border-radius: 6px; font-size: 0.85rem;
}
.track-header {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff; border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 20px;
}
.track-header .code { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; color: var(--gold-soft); }
.track-header .status-now { font-size: 1.35rem; font-family: var(--font-display); font-weight: 600; margin-top: 6px; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-20 { gap: 20px; }
.mt-0{margin-top:0} .mb-0{margin-bottom:0}
.text-muted { color: #777; }
.text-sm { font-size: 0.85rem; }
.text-center { text-align: center; }
.w-full { width: 100%; }
