:root {
  --bg: #8f5342;          /* nâu của shop (lấy từ logo) */
  --bg-deep: #78443a;
  --cream: #fbf7f4;
  --on-bg: #fbf1ea;       /* chữ đặt trực tiếp trên nền nâu */
  --on-bg-muted: #e6cfc4;
  --card: #ffffff;
  --ink: #2f2528;
  --muted: #86777b;
  --line: #eaded9;
  --rose: #b76e79;
  --rose-dark: #96545f;
  --blush: #f4e4e3;
  --gold: #b99a6b;
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--on-bg); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Thanh trên */
.top { position: sticky; top: 0; z-index: 20; background: rgba(143, 83, 66, .94); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255, 255, 255, .18); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.logo { font: 600 24px/1 var(--serif); letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav a:hover { color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 999px; border: 1px solid var(--on-bg); background: var(--on-bg); color: var(--bg); font-weight: 500; transition: background .15s, transform .15s; }
.btn:hover { background: #fff; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--on-bg); }
.btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.btn.sm { padding: 8px 18px; font-size: 14px; }
.btn.block { width: 100%; }

/* Landing */
.hero { background: linear-gradient(135deg, #a1604e, var(--bg) 70%); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.eyebrow { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: #ecd2b0; margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(38px, 6vw, 62px); }
h2 { font-size: clamp(28px, 4vw, 40px); text-align: center; }
.lead { color: var(--on-bg-muted); font-size: 17px; max-width: 480px; margin: 18px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-img { aspect-ratio: 4/5; border-radius: 200px 200px var(--radius) var(--radius); overflow: hidden; background: var(--blush); box-shadow: 0 24px 60px rgba(150, 84, 95, .18); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
section.block { padding: 64px 0 8px; }
.sub { text-align: center; color: var(--on-bg-muted); margin: 10px auto 32px; max-width: 520px; }

.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--blush); }
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat:hover img { transform: scale(1.05); }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(47, 37, 40, .62), transparent 55%); }
.cat div { position: absolute; left: 20px; right: 20px; bottom: 18px; color: #fff; z-index: 1; }
.cat h3 { font-size: 28px; }
.cat span { font-size: 13px; opacity: .9; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.perk { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; }
.perk b { display: block; font: 600 21px var(--serif); margin: 6px 0; }
.perk p { margin: 0; color: var(--muted); font-size: 14px; }
.perk .ico { font-size: 26px; }

.cta { margin: 64px 0 0; padding: 56px 16px; text-align: center; background: var(--bg-deep); color: #fff; }
.cta h2 { color: #fff; }
.cta p { color: var(--on-bg-muted); margin: 12px 0 26px; }

footer { padding: 28px 0 40px; text-align: center; color: var(--on-bg-muted); font-size: 13px; }

/* Cửa hàng */
.shop-head { padding: 28px 0 8px; text-align: center; }
.shop-head h1 { font-size: clamp(32px, 5vw, 46px); }
.shop-head p { color: var(--on-bg-muted); margin: 8px 0 0; }
.filters { position: sticky; top: 62px; z-index: 10; background: var(--bg); padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .38); background: transparent; color: var(--on-bg); font-size: 14px; white-space: nowrap; }
.chip em { font-style: normal; color: var(--on-bg-muted); font-size: 12px; margin-left: 4px; }
.chip.on { background: var(--on-bg); border-color: var(--on-bg); color: var(--bg); font-weight: 500; }
.chip.on em { color: #a8776a; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; align-items: center; }
.row input, .row select { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: inherit; color: var(--ink); min-width: 0; }
.row input[type=search] { flex: 1 1 200px; }
.row select { flex: 0 1 auto; }
.fbtn { height: 40px; padding: 0 18px; }
.searchbox { position: relative; flex: 1 1 200px; min-width: 0; }
.row .searchbox input[type=search] { width: 100%; padding-right: 54px; }
.imgbtn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--bg); }
.imgbtn:hover, .imgbtn:focus-visible { background: var(--blush); }
.imgbar { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); }
.imgbar[hidden] { display: none; }
.imgbar img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; background: #fff; }
.imgbar .msg { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.imgbar .msg span { color: var(--on-bg-muted); font-size: 13px; }
.imgbar .btn { flex: none; }
@media (max-width: 640px) { .imgbar { flex-wrap: wrap; } .imgbar .btn { width: 100%; } }
.panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15; background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 18px 50px rgba(30, 14, 10, .35); max-height: 70vh; overflow-y: auto; }
.panel[hidden] { display: none; }
.pgroup { margin-bottom: 14px; }
.plbl { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.panel .opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; font-size: 13px; color: var(--ink); }
.panel .opt span { color: var(--muted); font-size: 12px; }
.panel .opt .dot { display: inline-block; flex: none; }
.pfoot { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.panel .btn { background: var(--bg); border-color: var(--bg); color: #fff; }
.panel .btn:hover { background: var(--bg-deep); }
.panel .btn.ghost { background: transparent; color: var(--bg); }
.panel .btn.ghost:hover { background: var(--blush); }
.wrap { position: relative; }
.count { margin: 18px 0 12px; color: var(--on-bg-muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: left; padding: 0; display: block; width: 100%; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 12px 30px rgba(150, 84, 95, .14); transform: translateY(-2px); }
.card .ph { aspect-ratio: 1; background: var(--blush); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .info { padding: 12px 14px 14px; }
.card .code { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.card .name { font-size: 14px; margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.card .price { font-weight: 600; color: var(--rose-dark); }
.dots { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); }
.empty { text-align: center; color: var(--on-bg-muted); padding: 60px 0; }
.more { text-align: center; margin: 28px 0 0; }

/* Chi tiết */
.modal { position: fixed; inset: 0; z-index: 50; display: none; background: rgba(47, 37, 40, .55); align-items: center; justify-content: center; padding: 16px; }
.modal.on { display: flex; }
.sheet { background: var(--cream); color: var(--ink); border-radius: 18px; max-width: 880px; width: 100%; max-height: 92vh; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.sheet .pics { padding: 16px; }
.sheet .main { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--blush); }
.sheet .main img { width: 100%; height: 100%; object-fit: cover; }
.gal { display: flex; gap: 10px; align-items: flex-start; }
.gal .main { flex: 1; min-width: 0; position: relative; cursor: zoom-in; }
.thumbs { display: flex; flex-direction: column; gap: 8px; max-height: 336px; overflow-y: auto; flex: none; scrollbar-width: thin; }
.thumbs img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; flex: none; opacity: .75; }
.thumbs img.on { border-color: var(--bg); opacity: 1; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .88); color: var(--ink); font-size: 26px; line-height: 1; padding: 0 0 4px; }
.nav-btn.prev { left: 8px; }
.nav-btn.next { right: 8px; }
.counter { position: absolute; right: 10px; bottom: 10px; background: rgba(47, 37, 40, .6); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.zoom { position: fixed; inset: 0; z-index: 60; display: none; background: rgba(20, 12, 10, .92); align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.zoom.on { display: flex; }
.zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.sheet .body { padding: 28px 24px 24px; }
.sheet h3 { font: 600 22px/1.3 var(--sans); letter-spacing: -.01em; margin: 4px 0 0; padding-right: 36px; }
.sheet .price { font: 600 24px/1 var(--sans); color: var(--bg); margin: 12px 0 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.lbl { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 9px; }
.lbl b { font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); margin-left: 4px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-width: 48px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--bg); }
.opt.on { border-color: var(--bg); background: var(--bg); color: #fff; }
.opt.low::after { content: " · sắp hết"; font-size: 11px; color: var(--muted); }
.heel { margin: 18px 0 4px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.heel span { opacity: .85; }
.sheet .note { margin-top: 12px; line-height: 1.55; }.close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 22px; line-height: 1; z-index: 2; }
.note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.sheet .btn { background: var(--bg); border-color: var(--bg); color: #fff; font-size: 15px; font-weight: 600; padding: 14px 24px; }
.sheet .btn:hover { background: var(--bg-deep); }

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; padding-bottom: 36px; }
  .hero-img { max-width: 360px; margin: 0 auto; width: 100%; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cats, .perks { grid-template-columns: 1fr; }
  .cat { aspect-ratio: 16/10; }
  .nav a.hide-sm { display: none; }
  .sheet { grid-template-columns: 1fr; }
  .gal { flex-direction: column-reverse; }
  .thumbs { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; width: 100%; }
  .gal .main { width: 100%; flex: none; }
  .sheet .body { padding-top: 8px; }
  section.block { padding-top: 44px; }
}
