:root{
  --brand:#8e2457; --brand-d:#6d1a42; --accent:#f2b8c6; --ink:#1f1a1d; --muted:#6f6670;
  --bg:#faf7f8; --card:#fff; --line:#eee5e9; --ok:#1e8e5a; --err:#c62828; --radius:12px;
}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg);font-size:15px;line-height:1.55}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.wrap{max-width:1200px;margin:0 auto;padding:0 16px}
.main{padding-top:20px;padding-bottom:40px;min-height:60vh}
h1{font-size:24px;margin:0 0 16px} h2{font-size:20px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:var(--brand);color:#fff;border:0;border-radius:10px;padding:11px 20px;font-weight:600;font-size:15px;cursor:pointer}
.btn:hover{background:var(--brand-d)}
.btn.ghost{background:#fff;color:var(--brand);border:1.5px solid var(--brand)}
.btn.block{width:100%}
.btn.sm{padding:6px 12px;font-size:13px}
.alert{padding:12px 16px;border-radius:10px;margin-bottom:16px;background:#e8f5ee;color:var(--ok)}
.alert.err{background:#fdecec;color:var(--err)}
input,select,textarea{font:inherit;width:100%;padding:10px 12px;border:1px solid #ddd;border-radius:10px;background:#fff}
input:focus,select:focus,textarea:focus{outline:2px solid var(--accent);border-color:var(--brand)}
label{display:block;font-weight:600;font-size:14px;margin:12px 0 6px}

/* topbar + header */
.topbar{background:var(--ink);color:#f3e9ee;font-size:13px}
.topbar .wrap{display:flex;justify-content:space-between;gap:12px;padding:7px 16px}
.header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.header-in{display:flex;align-items:center;gap:16px;padding:12px 16px}
.logo{font-weight:800;font-size:22px;color:var(--brand);letter-spacing:-.3px;white-space:nowrap}
.search{flex:1;display:flex;max-width:560px;margin-left:auto}
.search input{border-radius:10px 0 0 10px;border-right:0}
.search button{border:0;background:var(--brand);color:#fff;padding:0 16px;border-radius:0 10px 10px 0;cursor:pointer}
.cart-link{position:relative;font-size:24px}
.cart-link .badge{position:absolute;top:-6px;right:-10px;background:var(--brand);color:#fff;font-size:11px;border-radius:10px;padding:1px 6px;font-weight:700}
.menu-btn{display:none;background:none;border:0;font-size:24px;cursor:pointer}
.nav{border-top:1px solid var(--line)}
.nav .wrap{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none}
.nav a{padding:11px 12px;font-weight:600;font-size:14px;white-space:nowrap;border-bottom:2px solid transparent}
.nav a:hover{color:var(--brand);border-color:var(--brand)}

/* hero */
.hero{background:linear-gradient(120deg,var(--brand) 0%,#c2457f 60%,#f2b8c6 100%);color:#fff;border-radius:18px;padding:40px 36px;display:grid;grid-template-columns:1.3fr 1fr;gap:24px;align-items:center}
.hero h1{font-size:32px;line-height:1.2;margin:0 0 12px}
.hero p{opacity:.95;margin:0 0 20px}
.hero .btn{background:#fff;color:var(--brand)}
.hero-badges{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hero-badges div{background:rgba(255,255,255,.16);border-radius:12px;padding:14px;font-size:14px;font-weight:600}
.cat-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin:24px 0}
.cat-item{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:14px 8px;text-align:center;font-weight:600;font-size:14px}
.cat-item img{width:64px;height:64px;border-radius:50%;margin:0 auto 8px;object-fit:cover}
.cat-item:hover{border-color:var(--brand);color:var(--brand)}
.section-head{display:flex;justify-content:space-between;align-items:center;margin:28px 0 12px}
.section-head h2{margin:0}
.section-head a{color:var(--brand);font-weight:600;font-size:14px}

/* product grid */
.grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
.card{background:var(--card);border-radius:var(--radius);overflow:hidden;border:1px solid var(--line);transition:.15s;display:flex;flex-direction:column}
.card:hover{box-shadow:0 6px 18px rgba(142,36,87,.12);transform:translateY(-2px)}
.card-img{position:relative;aspect-ratio:1;background:#f4eef1}
.card-img img{width:100%;height:100%;object-fit:cover}
.tag-sale{position:absolute;top:8px;left:8px;background:#e53935;color:#fff;font-size:12px;font-weight:700;padding:2px 7px;border-radius:6px}
.tag-aff{position:absolute;top:8px;right:8px;background:#ee4d2d;color:#fff;font-size:11px;padding:2px 6px;border-radius:6px}
.card-body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:4px;flex:1}
.card-name{font-size:14px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:39px}
.card-price b{color:var(--brand);font-size:16px}
.card-price s{color:#aaa;font-size:13px}
.card-meta{font-size:12px;color:var(--muted)}

/* listing */
.listing{display:grid;grid-template-columns:230px 1fr;gap:20px}
.sidebar{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px;align-self:start}
.sidebar h3{font-size:15px;margin:0 0 8px}
.sidebar a{display:block;padding:6px 0;font-size:14px}
.sidebar a.on{color:var(--brand);font-weight:700}
.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:12px}
.toolbar select{width:auto}
.listing .grid{grid-template-columns:repeat(4,1fr)}
.pager{display:flex;gap:6px;justify-content:center;margin-top:24px}
.pager a,.pager span{padding:7px 12px;border-radius:8px;background:#fff;border:1px solid var(--line)}
.pager span{background:var(--brand);color:#fff;border-color:var(--brand)}
.crumbs{font-size:13px;color:var(--muted);margin-bottom:12px}
.crumbs a:hover{color:var(--brand)}

/* product detail */
.pd{display:grid;grid-template-columns:1fr 1fr;gap:28px;background:#fff;border-radius:16px;padding:24px;border:1px solid var(--line)}
.pd-gallery .main-img{aspect-ratio:1;border-radius:12px;overflow:hidden;background:#f4eef1}
.pd-gallery .main-img img{width:100%;height:100%;object-fit:cover}
.thumbs{display:flex;gap:8px;margin-top:8px}
.thumbs img{width:64px;height:64px;object-fit:cover;border-radius:8px;cursor:pointer;border:2px solid transparent}
.thumbs img:hover{border-color:var(--brand)}
.pd h1{font-size:24px;margin-bottom:6px}
.pd-meta{color:var(--muted);font-size:14px;margin-bottom:12px}
.pd-price{background:#fbf3f6;border-radius:12px;padding:14px 16px;margin:12px 0}
.pd-price b{font-size:28px;color:var(--brand)}
.pd-price s{color:#999;margin-left:8px}
.pd-price .off{background:#e53935;color:#fff;font-size:12px;padding:2px 6px;border-radius:6px;margin-left:8px}
.qty{display:flex;align-items:center;gap:0;width:max-content;border:1px solid #ddd;border-radius:10px;overflow:hidden}
.qty button{background:#f5f5f5;border:0;width:38px;height:40px;font-size:18px;cursor:pointer}
.qty input{width:56px;text-align:center;border:0;border-radius:0}
.pd-actions{display:flex;gap:10px;margin:16px 0;flex-wrap:wrap}
.pd-actions .btn{flex:1;min-width:150px;padding:14px}
.btn.shopee{background:#ee4d2d}
.perks{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:6px;font-size:14px}
.pd-desc{background:#fff;border-radius:16px;padding:24px;border:1px solid var(--line);margin-top:20px}
.pd-desc h2{margin-top:0}

/* cart / checkout */
.two-col{display:grid;grid-template-columns:1fr 360px;gap:20px;align-items:start}
.box{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.cart-row{display:grid;grid-template-columns:72px 1fr auto auto;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.cart-row img{width:72px;height:72px;border-radius:8px;object-fit:cover}
.cart-row .qty input{width:44px}
.cart-row .qty button{width:30px;height:34px}
.sum-row{display:flex;justify-content:space-between;padding:6px 0}
.sum-row.total{font-size:18px;font-weight:800;color:var(--brand);border-top:1px solid var(--line);margin-top:8px;padding-top:12px}
.link-del{color:var(--err);background:none;border:0;cursor:pointer;font-size:13px}
.pay-opt{display:flex;gap:10px;align-items:flex-start;border:1px solid #ddd;border-radius:10px;padding:12px;margin-bottom:8px;cursor:pointer;font-weight:500}
.pay-opt input{width:auto;margin-top:4px}
.empty{text-align:center;padding:60px 20px}
.empty h1{font-size:48px;color:var(--brand)}
.bank{white-space:pre-line;background:#fbf3f6;border-radius:10px;padding:12px;font-family:ui-monospace,monospace;font-size:14px}
table.simple{width:100%;border-collapse:collapse}
table.simple td,table.simple th{padding:8px;border-bottom:1px solid var(--line);text-align:left}

/* blog */
.posts{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.post-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.post-card img{aspect-ratio:16/9;object-fit:cover;width:100%}
.post-card div{padding:14px}
.post-card h3{font-size:16px;margin:0 0 6px}
.post-card p{font-size:14px;color:var(--muted);margin:0}
.article{background:#fff;border:1px solid var(--line);border-radius:16px;padding:28px;max-width:820px;margin:0 auto}
.article img{border-radius:10px;margin:12px 0}

/* footer */
.footer{background:var(--ink);color:#d9cfd4;margin-top:40px;font-size:14px}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1.2fr;gap:24px;padding:36px 16px}
.footer .logo{color:#fff;margin-bottom:8px}
.footer h4{color:#fff;margin:0 0 10px}
.footer a{display:block;padding:3px 0}
.footer a:hover{color:#fff}
.copy{border-top:1px solid #3a3236;padding:14px 16px;font-size:13px;color:#a99ea4}
.float-contact{position:fixed;right:14px;bottom:18px;display:flex;flex-direction:column;gap:8px;z-index:30}
.fc{width:50px;height:50px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;font-weight:700;box-shadow:0 4px 12px rgba(0,0,0,.2)}
.fc.zalo{background:#0068ff}.fc.tele{background:#229ed9}.fc.call{background:var(--ok)}

/* age gate */
.agegate{position:fixed;inset:0;background:rgba(31,26,29,.92);z-index:100;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(6px)}
.agegate[hidden]{display:none}
.agegate-box{background:#fff;border-radius:18px;padding:32px 28px;max-width:420px;text-align:center}
.agegate-box h2{margin:12px 0 8px}
.agegate-box p{color:var(--muted);font-size:14px}
.agegate-btns{display:grid;gap:10px;margin-top:18px}

@media (max-width:1024px){
  .grid{grid-template-columns:repeat(4,1fr)}
  .listing .grid{grid-template-columns:repeat(3,1fr)}
  .cat-grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:768px){
  .hide-sm{display:none}
  .header-in{flex-wrap:wrap;gap:10px}
  .menu-btn{display:block}
  .search{order:3;flex-basis:100%;max-width:none}
  .cart-link{margin-left:auto}
  .nav{display:none}
  body.nav-open .nav{display:block}
  .nav .wrap{flex-direction:column}
  .hero{grid-template-columns:1fr;padding:26px 20px}
  .hero h1{font-size:22px}
  .hero-badges div{padding:10px;font-size:13px}
  .fc{width:42px;height:42px;font-size:11px}
  .topbar .wrap{font-size:12px}
  .grid,.listing .grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .listing,.two-col,.pd{grid-template-columns:1fr}
  .pd{padding:14px}
  .sidebar{display:none}
  .posts{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
  .cart-row{grid-template-columns:60px 1fr;}
  .cart-row img{width:60px;height:60px}
}
