/* Mock Webflow storefront for the local demo. Plain CSS, no build, no web fonts. */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f1eee6;
  --text: #1c1b19;
  --muted: #6b675e;
  --brand: #2f6b4f;
  --brand-ink: #ffffff;
  --brand-soft: #e3efe8;
  --accent: #e9b44c;
  --border: #e2ddd1;
  --danger: #a33a2a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(28, 27, 25, 0.06), 0 8px 24px rgba(28, 27, 25, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: inherit; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.02em; max-width: 18ch; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ── Header ───────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.site-nav { margin-left: auto; display: flex; gap: 1.25rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--text); }

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.6rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* ── Hero, sections ───────────────────────────────────────────────────────── */

.hero {
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3.5rem);
  max-width: 1120px;
  margin: 0 auto;
}

.eyebrow {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead { max-width: 52ch; color: var(--muted); font-size: 1.1rem; margin-bottom: 1.75rem; }

.products, .promise {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; margin-bottom: 1.5rem; }
.section-head p { color: var(--muted); margin: 0; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.promise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 3.5rem;
  margin-bottom: 3rem;
}

.promise > div {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.promise span { color: var(--muted); font-size: 0.95rem; }

.notice {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: #fff4e0;
  border: 1px solid #ecd39a;
}

/* ── Product card ─────────────────────────────────────────────────────────── */

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.card-cover svg { display: block; width: 100%; height: 100%; }

.card-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.1rem 1.2rem 1.25rem; flex: 1; }

.card-title {
  margin: 0;
  font-size: 1.1rem;
}

.card-title button {
  all: unset;
  cursor: pointer;
}

.card-title button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.card-desc { color: var(--muted); font-size: 0.95rem; margin: 0; }

.price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
}

.price-net { color: var(--muted); font-weight: 400; font-size: 0.85rem; }

.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.button:hover { border-color: var(--brand); }
.button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.button:disabled { opacity: 0.55; cursor: progress; }

.button-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.button-primary:hover { background: #275a42; border-color: #275a42; }
.button-block { width: 100%; margin-top: 1rem; }

.button-small { min-height: 2.25rem; padding: 0.35rem 0.8rem; font-size: 0.92rem; }

[data-checkout-busy="true"] .button-primary,
[data-checkout-busy="true"] [data-checkout-buy-now],
[data-checkout-busy="true"] [data-checkout-submit] { pointer-events: none; opacity: 0.6; }

.icon-button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* ── Dialogs (product, cart) ──────────────────────────────────────────────── */

dialog.sheet {
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 1.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

dialog.sheet-right {
  margin: 0 0 0 auto;
  height: 100vh;
  max-height: 100vh;
  width: min(440px, 100vw);
  border-radius: 0;
  overflow-y: auto;
}

dialog.sheet::backdrop { background: rgba(28, 27, 25, 0.45); }

.sheet-close-form { display: flex; justify-content: flex-end; margin: 0 0 0.5rem; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.sheet-head h2 { margin: 0; }

.product-detail { display: grid; gap: 1rem; }
.product-detail .card-cover { border-radius: 12px; overflow: hidden; }
.product-detail .card-actions { grid-template-columns: 1fr 1fr; }

.cart-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-line-name { font-weight: 600; }
.cart-line-meta { color: var(--muted); font-size: 0.9rem; }
.cart-line-controls { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; }
.cart-line-controls .qty { min-width: 2.2rem; text-align: center; font-variant-numeric: tabular-nums; }
.cart-line-controls .spacer { flex: 1; }

.qty-button {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
  cursor: pointer;
}

.link-button {
  border: 0;
  background: none;
  color: var(--danger);
  font: inherit;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.cart-empty { color: var(--muted); }

.cart-totals { display: grid; gap: 0.25rem; margin-top: 1rem; }
.cart-totals div { display: flex; justify-content: space-between; font-weight: 600; font-variant-numeric: tabular-nums; }

.field { display: grid; gap: 0.35rem; margin-top: 1.25rem; font-size: 0.92rem; color: var(--muted); }

.field input {
  min-height: 2.75rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
}

.field input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.fine { color: var(--muted); font-size: 0.85rem; margin-top: 0.75rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 9rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Status toast, continue link ──────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 20;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--text);
  color: #fff;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}

.toast:empty { display: none; }
.toast[data-state="error"] { background: var(--danger); }
.toast[data-state="ok"] { background: var(--brand); }
.toast[data-state="loading"] { background: #3b3a36; }
.toast[data-state="loading"]::before { content: "… "; }

.continue {
  position: fixed;
  left: 1rem;
  bottom: 4.5rem;
  z-index: 20;
}

.continue[hidden] { display: none; }

/* ── Developer panel ──────────────────────────────────────────────────────── */

.dev-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: min(560px, calc(100vw - 2rem));
  max-height: min(70vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #15181d;
  color: #e6e9ef;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dev-panel > summary {
  cursor: pointer;
  padding: 0.7rem 1rem;
  font-weight: 700;
  background: #1f242c;
  list-style: none;
  user-select: none;
}

.dev-panel > summary::-webkit-details-marker { display: none; }
.dev-panel > summary::before { content: "▸ "; }
.dev-panel[open] > summary::before { content: "▾ "; }

.dev-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1rem 0;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

.dev-controls button {
  border: 1px solid #3b4250;
  background: #20252d;
  color: #e6e9ef;
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.dev-hint { margin: 0.5rem 1rem 0.25rem; color: #9aa3b2; font-family: system-ui, sans-serif; font-size: 0.85rem; }

#dev-list {
  overflow-y: auto;
  padding: 0.5rem 1rem 1rem;
  display: grid;
  gap: 0.75rem;
}

.trace {
  border: 1px solid #2b313b;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #1a1e25;
}

.trace-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem; }
.trace-method { color: #7dd3fc; font-weight: 700; }
.trace-status-ok { color: #86efac; font-weight: 700; }
.trace-status-bad { color: #fca5a5; font-weight: 700; }
.trace-meta { color: #9aa3b2; }
.trace-label { color: #9aa3b2; font-size: 0.8rem; margin: 0.4rem 0 0.15rem; }

.trace pre {
  margin: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: #0f1217;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}

.trace a { color: #7dd3fc; word-break: break-all; }

/* ── Small screens ────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .site-nav { display: none; }
  .card-actions { grid-template-columns: 1fr; }
  .dev-panel { right: 0.5rem; left: 0.5rem; width: auto; bottom: 0.5rem; }
  .toast { left: 0.5rem; right: 0.5rem; bottom: auto; top: 4.25rem; max-width: none; }
  .continue { left: 0.5rem; bottom: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
