:root {
  --bg: #fffaf2;
  --surface: #ffffff;
  --ink: #141210;
  --muted: #6e655c;
  --line: #eee3d3;
  --accent: #f26b1d;
  --accent-ink: #141210;
  --accent-soft: #fff1c7;
  --yellow: #ffc31f;
  --ok: #2a8a5c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .logo { font-family: "Space Grotesk", Inter, sans-serif; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1rem; }
h3 { font-size: 1.1rem; margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.small { font-size: .85rem; color: var(--muted); }
.muted { color: var(--muted); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
main { min-height: 70vh; padding-bottom: 64px; outline: none; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 99; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(250,248,245,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { text-decoration: none; display: flex; align-items: center; }
.logo img { height: 58px; width: auto; mix-blend-mode: multiply; }
.footer-logo { height: 64px; width: auto; mix-blend-mode: multiply; margin-bottom: 8px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--ink); }
.cart-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; text-decoration: none; }
.cart-btn:hover { background: var(--line); }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 1.5px solid var(--ink); }
.cart-count[data-zero="true"] { display: none; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--ink); border-radius: 999px; padding: 12px 22px; font: 700 15px Inter, sans-serif; cursor: pointer; text-decoration: none; background: var(--yellow); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform .1s, box-shadow .1s; }
.btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn.secondary { background: #fff; }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }

label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 56px 0 40px; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 32ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-art { aspect-ratio: 1; border-radius: 28px; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); display: grid; place-items: center; overflow: hidden; }
.hero-art img { width: 82%; height: auto; mix-blend-mode: multiply; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 56px; }
.perk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.perk strong { display: block; }
.perk span { color: var(--muted); font-size: .92rem; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }

/* Product grid */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 32px 0 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font: 500 14px Inter, sans-serif; cursor: pointer; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.toolbar .search { margin-left: auto; max-width: 240px; }
.toolbar select { width: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); text-decoration: none; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img { aspect-ratio: 1; background: #f1ede8; position: relative; }
.card-img img, .card-img svg { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--surface); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.low { background: var(--accent); color: #fff; }
.badge.out { background: var(--ink); color: #fff; }
.card-body { padding: 14px 16px 18px; display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.card-body .cat { font-size: .8rem; color: var(--muted); }
.price { font-weight: 600; white-space: nowrap; }
.empty { text-align: center; padding: 60px 0; color: var(--muted); }

/* Product page */
.crumbs { margin: 24px 0; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.product-img { border-radius: 20px; overflow: hidden; background: #f1ede8; aspect-ratio: 1; }
.product-img svg, .product-img img { width: 100%; height: 100%; object-fit: cover; }
.product .price { font-size: 1.5rem; margin: 6px 0 18px; }
.meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin: 18px 0; }
.option-group { margin: 20px 0; }
.option-group legend { font-weight: 600; font-size: .9rem; margin-bottom: 10px; padding: 0; }
fieldset { border: 0; padding: 0; margin: 0; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; box-shadow: inset 0 0 0 3px var(--surface); }
.swatch input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--surface), 0 0 0 2px var(--yellow); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill input { position: absolute; opacity: 0; }
.pill span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .9rem; background: var(--surface); }
.pill input:checked + span { border-color: var(--ink); background: var(--yellow); color: var(--ink); font-weight: 600; }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.buy-row { display: flex; gap: 12px; margin-top: 24px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { width: 38px; height: 44px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--ink); }
.qty input { width: 40px; border: 0; text-align: center; padding: 0; background: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm button { height: 34px; width: 32px; }
.buy-row .btn { flex: 1; }
.note { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin-top: 20px; }

/* Cart & checkout */
.page-title { margin: 36px 0 24px; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item .thumb { width: 88px; height: 88px; border-radius: 10px; overflow: hidden; background: #f1ede8; }
.cart-item .thumb svg, .cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .opts { font-size: .85rem; color: var(--muted); }
.cart-item .right { text-align: right; display: grid; gap: 8px; justify-items: end; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 84px; }
.summary .row { display: flex; justify-content: space-between; margin: 8px 0; }
.summary .total { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.summary .btn { margin-top: 16px; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 6px 0 4px; }
.progress div { height: 100%; background: var(--accent); }
.mini-item { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; margin: 6px 0; }

.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.success { text-align: center; max-width: 560px; margin: 60px auto; }
.success .check { width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); display: grid; place-items: center; margin: 0 auto 20px; font-size: 32px; }

/* About / FAQ */
.prose { max-width: 720px; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 12px 32px; }
.footer-inner p { margin: 4px 0 0; color: var(--muted); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-inner .small { grid-column: 1 / -1; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--ink); color: #fff; border-left: 6px solid var(--accent); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); transition: transform .25s; z-index: 50; display: flex; gap: 14px; align-items: center; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }
.toast a { color: var(--yellow); font-weight: 600; }

@media (max-width: 860px) {
  .hero, .product, .cart-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; gap: 24px; }
  .hero-art { max-width: 420px; }
  .perks { grid-template-columns: 1fr; }
  .summary { position: static; }
  .toolbar .search { margin-left: 0; max-width: none; flex: 1; }
}
@media (max-width: 560px) {
  .nav { gap: 14px; font-size: .9rem; }
  .nav a[href="#/about"] { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { flex-direction: column; gap: 2px; padding: 10px 12px 14px; }
  .grid-2 { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 64px 1fr; }
  .cart-item .thumb { width: 64px; height: 64px; }
  .cart-item .right { grid-column: 2; justify-items: start; text-align: left; grid-auto-flow: column; align-items: center; justify-content: space-between; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* Photo gallery (portrait product shots) */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.gallery .shot { margin: 0; background: #f1ede8; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 2 / 3; }
.gallery .shot img { width: 100%; height: 100%; object-fit: contain; }
.card-img img { object-fit: contain !important; background: #f1ede8; }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr 1fr; } }
