:root {
  --bg: #fbfaf7; --card: #ffffff; --ink: #1c2a22; --muted: #66706a; --line: #e8e5dd;
  --brand: #1f5e3b; --brand-ink: #ffffff; --accent: #c8a24a; --soft: #eef4ef; --warn: #fff6e0; --bad: #fdecea;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
.test-bar { background: #1c2a22; color: #fff; text-align: center; font-size: 13px; padding: 7px 12px; }
header { border-bottom: 1px solid var(--line); background: var(--card); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
header .wrap { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--accent); }
header nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }

.product { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; padding: 36px 0 20px; align-items: start; }
.gallery .main { aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: #e9ece8; }
.gallery .main img, .gallery .main video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: #e9ece8; position: relative; }
.thumbs button.on { border-color: var(--brand); }
.thumbs img, .thumbs video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 20px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

h1 { font-size: 32px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; }
.price { font-size: 26px; font-weight: 700; margin: 6px 0 4px; }
.ship-note { color: var(--muted); font-size: 14px; }
.desc { margin: 18px 0; }
.points { padding: 0; list-style: none; margin: 0 0 18px; }
.points li { padding-left: 26px; position: relative; margin: 6px 0; }
.points li::before { content: "★"; color: var(--accent); position: absolute; left: 2px; }
.label { font-weight: 700; font-size: 14px; margin: 18px 0 8px; }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.sizes button { border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 14px; font: inherit; font-size: 15px; cursor: pointer; }
.sizes button.on { border-color: var(--brand); background: var(--soft); color: var(--brand); font-weight: 600; }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.qty button { border: 0; background: none; width: 40px; font-size: 20px; cursor: pointer; }
.qty span { width: 40px; display: grid; place-items: center; font-weight: 600; }
.buy { display: block; width: 100%; margin-top: 22px; border: 0; border-radius: 12px; padding: 16px; font: inherit; font-size: 17px; font-weight: 700; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
.buy:hover { filter: brightness(1.08); }
.buy:disabled { opacity: .55; cursor: wait; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
.trust div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; }
.err { background: var(--bad); color: #8a1c13; border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 14px; }

.info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 30px 0 50px; }
.info .card h3 { margin: 0 0 6px; font-size: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

.narrow { max-width: 560px; margin: 40px auto 60px; }
.narrow h1 { font-size: 28px; }
.status { display: inline-block; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: var(--soft); color: var(--brand); font-size: 14px; }
.status.cancel { background: var(--bad); color: #8a1c13; }
.lines { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.lines td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.lines td:last-child { text-align: right; }
.lines tr.total td { font-weight: 700; border-bottom: 0; }
form label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 5px; }
form input { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); }
.row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.fake-card { background: var(--warn); border-radius: 10px; padding: 12px; font-size: 14px; margin-top: 14px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 22px 0 30px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; gap: 22px; padding-top: 16px; }
  .info { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
  .wrap { padding: 0 16px; }
  header nav a { margin-left: 12px; }
}

/* trang chủ */
.hero { padding: 40px 0 12px; }
.hero h1 { font-size: 36px; max-width: 640px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; padding: 18px 0 50px; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.tile-media { aspect-ratio: 4 / 5; background: #e9ece8; }
.tile-media img, .tile-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-info { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--brand); background: var(--soft); padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
@media (max-width: 820px) { .hero h1 { font-size: 28px; } }

/* trang chính sách + liên hệ */
.doc { max-width: 720px; padding-top: 32px; padding-bottom: 48px; }
.doc h1 { font-size: 32px; margin: 0 0 6px; }
.doc h2 { font-size: 19px; margin: 28px 0 6px; }
.doc p, .doc li { color: #2d3a32; }
.doc .note { color: var(--muted); font-size: 14px; }
.contact { display: grid; gap: 14px; margin-top: 18px; }
.contact label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.contact small { font-weight: 400; color: var(--muted); }
.contact textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); resize: vertical; }
.contact .buy { margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
footer .links a { color: var(--muted); text-decoration: none; }
footer .links a:hover { color: var(--brand); }

/* Web con theo thương hiệu */
.hero .intro { max-width: 620px; margin: 6px 0 0; color: var(--muted); }
.parent-note { flex-basis: 100%; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 8px 0 26px; }
.brands:empty { display: none; }
.brand-card { display: block; padding: 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--c); text-decoration: none; color: var(--ink); }
.brand-card b { display: block; font-size: 18px; }
.brand-card span { color: var(--muted); font-size: 14px; }
