/* ---------- Design tokens ---------- */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #12141a;
  --muted: #667085;
  --border: #e6e8ee;
  --accent: linear-gradient(135deg, #4f46e5, #06b6d4);
  --accent-solid: #4f46e5;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(18, 20, 26, .08);
  --shadow-lg: 0 18px 48px rgba(18, 20, 26, .16);
  --maxw: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e14;
    --surface: #151824;
    --ink: #eef0f6;
    --muted: #9aa3b2;
    --border: #262a38;
    --shadow: 0 6px 24px rgba(0, 0, 0, .4);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }
a { color: var(--accent-solid); text-decoration: none; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.grad {
  background: var(--accent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Header (glass, sticky) ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.hdr-in, .ftr-in, .section, .buy-wrap, .cart-page, .container {
  max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem;
}
.hdr-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -.03em; }
.logo span { color: var(--accent-solid); }
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav a { color: var(--ink); font-weight: 600; }
.cart-link { display: inline-flex; align-items: center; gap: .4rem; }
.cart-badge {
  background: var(--accent-solid); color: #fff; font-size: .75rem; font-weight: 700;
  min-width: 1.3rem; height: 1.3rem; border-radius: 999px; display: grid; place-items: center; padding: 0 .3rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 700; color: #fff; background: var(--accent);
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; }
.btn-ghost {
  background: transparent; color: var(--accent-solid);
  border: 1.5px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--accent-solid); }
button.link { background: none; border: 0; color: #d92d20; cursor: pointer; padding: 0; font: inherit; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 1.25rem; text-align: center; }
.hero-in { max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; margin: 0 0 1rem; }
.lead { font-size: clamp(1rem, 2.5vw, 1.2rem); color: var(--muted); margin: 0 auto 1.5rem; max-width: 620px; }
.trust { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 1.75rem; }
.trust-i {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: .4rem .9rem; font-size: .85rem; font-weight: 600; box-shadow: var(--shadow);
}
.trust.light .trust-i { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .3); color: #fff; box-shadow: none; }

/* ---------- Section ---------- */
.section { padding: 2rem 1.25rem 4rem; }
.section-title { font-size: 1.6rem; margin: 0 0 1.5rem; }

/* ---------- Brand grid ---------- */
.brand-grid {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.brand-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.brand-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.brand-card a { color: var(--ink); display: block; }
.brand-visual {
  height: 150px; display: grid; place-items: center; padding: 1.25rem;
  background: var(--accent); position: relative;
}
.brand-visual::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.05); }
.brand-visual img { max-height: 108px; width: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.25)); position: relative; z-index: 1; }
.brand-body { padding: 1rem 1.1rem 1.2rem; }
.brand-body h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
.brand-tag { margin: 0 0 .8rem; color: var(--muted); font-size: .9rem; min-height: 2.6em; }
.brand-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.brand-price { font-weight: 800; }
.chip {
  font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-solid) 12%, transparent); color: var(--accent-solid);
}

/* ---------- Brand hero (page marque) ---------- */
.brand-hero { background: var(--accent); color: #fff; }
.brand-hero-in { max-width: var(--maxw); margin: 0 auto; padding: 1.25rem 1.25rem 2.5rem; }
.back { color: rgba(255,255,255,.9); font-weight: 600; display: inline-block; margin: .75rem 0 1.5rem; }
.back:hover { color: #fff; }
.brand-hero-row { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.brand-hero-visual {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius); padding: 1.25rem; width: 220px; display: grid; place-items: center;
}
.brand-hero-visual img { max-height: 130px; width: auto; filter: drop-shadow(0 10px 20px rgba(0,0,0,.3)); }
.brand-hero-txt h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 0 0 .5rem; }
.brand-hero-txt .lead { color: rgba(255,255,255,.92); margin: 0 0 1rem; }

/* ---------- Buy cards ---------- */
.buy-wrap {
  display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  padding: 2rem 1.25rem 4rem; margin-top: -1.5rem;
}
.buy-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.buy-card h2 { margin: 0 0 .3rem; font-size: 1.3rem; }
.buy-card .muted { margin: 0 0 1.2rem; font-size: .92rem; }
.buy-form { display: grid; gap: 1.1rem; }
.amounts { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.amounts legend { font-weight: 700; margin-bottom: .5rem; width: 100%; padding: 0; }
.amount-opt { position: relative; cursor: pointer; }
.amount-opt input[type=radio] { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.amount-val {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .55rem .9rem; border: 1.5px solid var(--border); border-radius: 12px;
  font-weight: 700; transition: border-color .15s, background .15s, transform .1s;
  background: var(--surface);
}
.amount-opt:hover .amount-val { border-color: var(--accent-solid); }
.amount-opt input:checked + .amount-val {
  border-color: var(--accent-solid);
  background: color-mix(in srgb, var(--accent-solid) 12%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-solid) 18%, transparent);
}
.amount-free .amount-val input {
  width: 84px; padding: .3rem .4rem; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-weight: 700; background: var(--bg); color: var(--ink);
}
label.qty, label.barcode { display: grid; gap: .35rem; font-weight: 700; font-size: .9rem; }
label.qty { width: 72px; }
label.qty input { width: 100%; min-width: 0; }
input[type=number], input[type=text], input[type=email] {
  padding: .6rem .7rem; border: 1.5px solid var(--border); border-radius: 10px;
  font: inherit; background: var(--surface); color: var(--ink);
}
input:focus-visible { outline: 2px solid var(--accent-solid); outline-offset: 1px; }
.buy-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.buy-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- Cart / checkout ---------- */
.container { padding-top: 2rem; padding-bottom: 4rem; }
h1 { font-size: 1.8rem; }
.cart { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cart th, .cart td { padding: .85rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.cart th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.total { font-size: 1.2rem; margin: 1.25rem 0; }
.summary, .checkout-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.summary { margin-bottom: 1.5rem; }
.summary ul { padding-left: 1.1rem; margin: .5rem 0; }
.checkout-form { display: grid; gap: 1rem; max-width: 460px; }
.checkout-form label { display: grid; gap: .35rem; font-weight: 700; }
.pay-trust { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.pay-trust li { font-size: .9rem; font-weight: 600; }
.pay-note { font-size: .85rem; color: #92660c; background: #fff8e6; padding: .6rem .8rem; border-radius: 10px; margin: 0; }
@media (prefers-color-scheme: dark) { .pay-note { color: #fde68a; background: rgba(146,102,12,.18); } }

/* ---------- Product detail (deep link) ---------- */
.product { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2rem; align-items: start; padding-top: 2rem; }
.product-media img { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem; }
.add-form { display: grid; gap: .75rem; max-width: 360px; margin: 1.25rem 0; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.add-form label { display: grid; gap: .35rem; font-weight: 700; }
.pre { white-space: pre-line; }
.details, .legal, .validity { margin-top: 1rem; }
.legal { font-size: .8rem; color: var(--muted); }
.price { font-weight: 800; color: var(--accent-solid); }

/* ---------- Voucher (confirmation) ---------- */
.voucher { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; box-shadow: var(--shadow); }
.voucher code { background: var(--bg); padding: .12rem .45rem; border-radius: 6px; }

/* ---------- Footer ---------- */
.ftr { border-top: 1px solid var(--border); margin-top: 2rem; }
.ftr-in { padding: 2.5rem 1.25rem; color: var(--muted); text-align: center; }
.ftr-brand { font-weight: 800; color: var(--ink); font-size: 1.1rem; }
.ftr-brand span { color: var(--accent-solid); }
.ftr-legal { font-size: .82rem; }

@media (max-width: 640px) {
  .product { grid-template-columns: 1fr; }
  .brand-hero-visual { width: 100%; }
}
