:root {
  --paper: #fbf8f2;
  --cream: #f3ede2;
  --sage: #e1e8da;
  --sage-2: #cfdcc6;
  --forest: #234a36;
  --forest-2: #2f5f46;
  --ink: #1b2620;
  --muted: #5d6a62;
  --clay: #b85f35;
  --line: rgba(27, 38, 32, .12);
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(27,38,32,.05), 0 8px 28px -12px rgba(27,38,32,.18);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.small { font-size: 13px; color: var(--muted); }

/* ---------- Header ---------- */
.topbar {
  background: var(--forest); color: #e6eee1;
  text-align: center; font-size: 13px; padding: 8px 16px; letter-spacing: .01em;
}
.header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark circle { fill: var(--forest); }
.brand-mark path { fill: var(--sage); }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .15s; }
.nav a:hover, .nav a.active { color: var(--ink); }
.cart-btn {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 8px 10px 8px 14px; font-weight: 600; font-size: 14px;
  transition: border-color .15s, transform .15s;
}
.cart-btn:hover { border-color: var(--forest); }
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cart-count {
  min-width: 24px; height: 24px; border-radius: 999px; background: var(--forest); color: #fff;
  display: grid; place-items: center; font-size: 12px; padding: 0 7px;
}
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.08); } }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--clay); }
.hero h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.02; letter-spacing: -.025em; margin: 14px 0 18px;
}
.hero h1 em { font-style: italic; color: var(--forest-2); }
.hero p { font-size: 18px; color: var(--muted); max-width: 46ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 1 / .92; }
.hero-art .blob { position: absolute; border-radius: 50%; background: var(--sage); }
.hero-art .b1 { inset: 4% 10% 10% 6%; }
.hero-art .b2 { width: 34%; aspect-ratio: 1; right: 0; top: 0; background: var(--cream); }
.hero-art img { position: absolute; filter: drop-shadow(0 18px 24px rgba(27,38,32,.18)); }
.hero-art .i1 { width: 50%; left: 8%; top: 16%; }
.hero-art .i2 { width: 40%; right: 6%; top: 30%; }
.hero-art .i3 { width: 34%; left: 40%; bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 13px 22px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; text-decoration: none; transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-2); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.trust div { border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; color: var(--muted); }
.trust strong { display: block; color: var(--ink); font-size: 15px; }

/* ---------- Shop ---------- */
.shop { padding: 24px 0 80px; }
.shop-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.shop-head h2 { font-family: var(--serif); font-weight: 400; font-size: 36px; letter-spacing: -.02em; margin: 0; }
.shop-head .count { color: var(--muted); font-size: 14px; margin-left: 10px; font-family: var(--sans); }
.tools { display: flex; gap: 10px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 14px; height: 42px; min-width: 240px;
}
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; width: 100%; color: inherit; }
.search svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; }
select.sort {
  height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  padding: 0 14px; font: inherit; font-size: 14px; color: inherit;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 26px; scrollbar-width: none; }
.chip {
  white-space: nowrap; border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 8px 16px; font-size: 14px; font-weight: 500; transition: all .15s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid var(--line); transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img {
  background: var(--cream); aspect-ratio: 1; display: grid; place-items: center; position: relative;
  border: 0; padding: 0; width: 100%;
}
.card-img img { width: 78%; height: 78%; object-fit: contain; transition: transform .35s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.badge {
  position: absolute; left: 12px; top: 12px; background: var(--card); color: var(--clay);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px;
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card-title { font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.card-title button { all: unset; cursor: pointer; }
.card-title button:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-desc { font-size: 14px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.price { font-weight: 700; font-size: 17px; }
.add {
  border: 0; background: var(--sage); color: var(--forest); font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 9px 16px; transition: background .15s;
}
.add:hover { background: var(--sage-2); }
.add.added { background: var(--forest); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- Drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20,28,24,.35); z-index: 40; opacity: 0; transition: opacity .2s; }
.scrim.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 100%); background: var(--paper); z-index: 50;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  box-shadow: -20px 0 50px -20px rgba(0,0,0,.25);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0; }
.icon-btn { border: 0; background: var(--cream); width: 36px; height: 36px; border-radius: 50%; font-size: 14px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px 22px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line img { width: 64px; height: 64px; object-fit: contain; background: var(--cream); border-radius: 12px; padding: 6px; }
.line-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.line-price { font-size: 13px; color: var(--muted); }
.line-total { font-weight: 700; font-size: 14px; text-align: right; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: 6px; background: var(--card); }
.qty button { border: 0; background: transparent; width: 28px; height: 28px; font-size: 16px; }
.qty span { min-width: 22px; text-align: center; font-size: 14px; font-weight: 600; }
.remove { border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 4px 0 0; display: block; margin-left: auto; }
.sum-row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 6px; }
.sum-row.total { font-size: 18px; font-weight: 700; margin: 10px 0 16px; }
.cart-empty { text-align: center; padding: 60px 10px; color: var(--muted); }

/* ---------- Product dialog ---------- */
.pdialog {
  border: 0; border-radius: 24px; padding: 0; width: min(920px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.4);
}
.pdialog::backdrop { background: rgba(20,28,24,.45); }
.pd { display: grid; grid-template-columns: 1fr 1fr; }
.pd-img { background: var(--cream); display: grid; place-items: center; padding: 40px; }
.pd-img img { max-height: 420px; object-fit: contain; }
.pd-body { padding: 40px 36px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.pd-body h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
.pd-body .price { font-size: 24px; }
.pd-body p { color: var(--muted); margin: 0; }
.pd-close { position: absolute; top: 16px; right: 16px; }
.pd-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.pd-actions .qty { margin: 0; height: 48px; }
.pd-actions .qty button { width: 40px; height: 46px; }
.note { font-size: 13px; background: var(--cream); border-radius: 12px; padding: 10px 12px; color: var(--muted); }

/* ---------- Checkout ---------- */
.checkout { padding: 40px 0 90px; }
.back { display: inline-flex; gap: 6px; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 18px; }
.back:hover { color: var(--ink); }
.checkout h1 { font-family: var(--serif); font-weight: 400; font-size: 42px; letter-spacing: -.02em; margin: 0 0 28px; }
.co-grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel + .panel { margin-top: 18px; }
.panel h3 { margin: 0 0 18px; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--sage); color: var(--forest); font-size: 13px; display: grid; place-items: center; font-weight: 700; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; color: inherit; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest) 18%, transparent); }
.field input:user-invalid { border-color: var(--clay); }
.summary { position: sticky; top: 96px; }
.summary .line { grid-template-columns: 52px 1fr auto; }
.summary .line img { width: 52px; height: 52px; }
.pay-note { display: flex; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.45; }
.pay-note svg { flex: none; width: 18px; height: 18px; stroke: var(--forest); fill: none; stroke-width: 1.8; margin-top: 1px; }
.form-error { color: var(--clay); font-size: 14px; margin-top: 10px; min-height: 1em; }

/* ---------- Order confirmation ---------- */
.done { padding: 56px 0 90px; }
.done-card { max-width: 680px; margin: 0 auto; text-align: center; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--sage); display: grid; place-items: center; margin: 0 auto 18px; }
.done-icon svg { width: 30px; stroke: var(--forest); fill: none; stroke-width: 2.2; }
.done h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; margin: 0 0 8px; letter-spacing: -.02em; }
.order-no { display: inline-block; background: var(--cream); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px; margin-bottom: 18px; }
.done p { color: var(--muted); }
.steps-list { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 26px 0; }
.steps-list ol { margin: 0; padding-left: 20px; }
.steps-list li { margin: 8px 0; }
.copy-box { text-align: left; font-size: 14px; background: var(--cream); border-radius: 14px; padding: 16px 18px; margin-top: 12px; }
.copy-box dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; margin: 0; }
.copy-box dt { color: var(--muted); }
.copy-box dd { margin: 0; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--forest); color: #dfe8da; padding: 54px 0 40px; }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { color: #fff; margin-bottom: 10px; }
.footer h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #a9bfa9; }
.footer a { display: block; text-decoration: none; margin: 6px 0; font-size: 14px; }
.footer a:hover { text-decoration: underline; }
.footer p { font-size: 14px; color: #c3d2c0; max-width: 40ch; }
.footer .small { color: #a9bfa9; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: all .25s; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .hero-in, .co-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .hero-art { max-width: 460px; margin: 0 auto; width: 100%; }
  .summary { position: static; }
  .pd { grid-template-columns: 1fr; }
  .pd-img { padding: 24px; }
  .pd-img img { max-height: 260px; }
  .pd-body { padding: 26px 22px; }
  .footer-in { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .trust { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .search { min-width: 0; flex: 1; }
  .tools { width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 12px; }
  .card-title { font-size: 16px; }
  .card-desc { display: none; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .panel { padding: 20px; }
  .checkout h1 { font-size: 34px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131915; --cream: #1d2620; --sage: #26372c; --sage-2: #2f4537; --card: #18201b;
    --ink: #eef2ea; --muted: #a2afa5; --line: rgba(238,242,234,.12); --forest: #3d7a58; --forest-2: #4a8d68; --clay: #e08a5d;
  }
  .brand-mark path { fill: #dfe7d8; }
  .add { color: #cfe3d2; }
  .footer { background: #0e130f; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
