:root {
  --bg: #fbf5ea;
  --surface: #ffffff;
  --surface-2: #f4e9d5;
  --ink: #3a2a1e;
  --muted: #6b5646;
  --line: #e6d8bf;
  --primary: #a94a22;
  --primary-hover: #8e3a17;
  --on-primary: #ffffff;
  --sage: #4f6f4a;
  --mustard: #e3a93b;
  --sky: #4c86a8;
  --destructive: #b3261e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-control: 12px;
  --shadow: 0 1px 2px rgba(58, 42, 30, 0.06), 0 8px 24px rgba(58, 42, 30, 0.08);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-control); z-index: 100; }
.skip:focus { left: 8px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border: 2px solid var(--primary);
  border-radius: var(--radius-control); background: var(--primary); color: var(--on-primary);
  font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-block { width: 100%; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--primary); text-decoration: underline; cursor: pointer; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(251, 245, 234, 0.94);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.5rem var(--font-display); }
.brand svg { width: 32px; height: 32px; }
.nav { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.nav a { padding: 8px 14px; border-radius: var(--radius-control); text-decoration: none; font-weight: 700; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--surface-2); }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  background: transparent; border: 2px solid var(--ink); border-radius: var(--radius-control);
  font: 700 1rem var(--font-body); color: var(--ink); cursor: pointer;
}
.cart-btn:hover { background: var(--ink); color: #fff; }
.cart-btn svg { width: 22px; height: 22px; }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 0.8rem; line-height: 22px; text-align: center; }
.cart-count:empty { display: none; }

/* sections */
.section { padding: clamp(40px, 7vw, 88px) var(--gutter); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.kicker { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sage); margin-bottom: 12px; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 40em; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding: clamp(32px, 6vw, 80px) var(--gutter); }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 28px; }
.hero-art { width: 100%; max-width: 540px; justify-self: center; }
.hero-art svg { width: 100%; height: auto; }

/* category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.cat-tile {
  position: relative; display: flex; flex-direction: column; justify-content: end; min-height: 170px; padding: 22px;
  border-radius: var(--radius-lg); background: var(--surface-2); text-decoration: none; overflow: hidden;
  border: 1px solid var(--line); transition: transform 0.15s, box-shadow 0.15s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-tile .cat-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(58,42,30,0) 30%, rgba(58,42,30,0.78)); }
.cat-tile.has-img { color: #fff; }
.cat-tile .cat-body { position: relative; }
.cat-tile h3 { font-size: 1.3rem; }
.cat-tile span { font-size: 0.95rem; opacity: 0.85; }
.cat-tile:nth-child(4n+1):not(.has-img) { background: #f2dcc0; }
.cat-tile:nth-child(4n+2):not(.has-img) { background: #dfe8d6; }
.cat-tile:nth-child(4n+3):not(.has-img) { background: #d8e5ee; }
.cat-tile:nth-child(4n+4):not(.has-img) { background: #f6e3a9; }

/* product grid + card */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow 0.15s, transform 0.15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .hover { position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s; }
.card:hover .card-media .hover { opacity: 1; }
.ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 0.9rem; }
.ribbons { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ribbon { background: var(--ink); color: #fff; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-sm); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.card-name { font: 600 1.1rem var(--font-display); text-decoration: none; }
.card-name:hover { text-decoration: underline; }
.price { font-weight: 800; }
.was { margin-left: 8px; color: var(--muted); font-weight: 400; text-decoration: line-through; }
.discount-note { font-size: 0.88rem; color: var(--sage); font-weight: 700; }
.opts { font-size: 0.9rem; color: var(--muted); }
.dots { display: flex; gap: 5px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); }
.card-action { margin-top: auto; padding-top: 10px; }

/* states */
.state { padding: 48px 16px; text-align: center; color: var(--muted); }
.state .btn { margin-top: 14px; }
.error-text, .field-error { color: var(--destructive); font-weight: 600; font-size: 0.95rem; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), #fff7e8, var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: var(--radius-lg); min-height: 320px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* values band */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.value { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.value h3 { margin-bottom: 8px; }
.value p { margin: 0; color: var(--muted); }
.value svg { width: 40px; height: 40px; margin-bottom: 14px; }
.band { margin: 0 var(--gutter) clamp(40px, 7vw, 88px); padding: clamp(28px, 5vw, 56px); border-radius: var(--radius-lg); background: var(--ink); color: #fff; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band p { margin: 8px 0 0; color: #e9dcc7; }
.band .btn-ghost { color: #fff; border-color: #fff; }
.band .btn-ghost:hover { background: #fff; color: var(--ink); }

/* shop */
.page-head { padding: clamp(28px, 5vw, 56px) var(--gutter) 8px; }
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding: 16px var(--gutter) 72px; align-items: start; }
.filters { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 22px; }
.filters fieldset { border: 0; margin: 0; padding: 0; }
.filters legend, .field-label { font-weight: 800; margin-bottom: 8px; padding: 0; display: block; }
.check { display: flex; align-items: center; gap: 10px; padding: 4px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.check small { color: var(--muted); }
.price-pair { display: flex; gap: 10px; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--radius-control);
  background: #fff; color: var(--ink); font: inherit;
}
.textarea { min-height: 140px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--sky); outline: none; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--destructive); }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-control); border: 2px solid var(--line); background: var(--surface);
  font: 700 0.95rem var(--font-body); color: var(--ink); cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[disabled] { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.swatch { width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch[disabled] { opacity: 0.35; cursor: not-allowed; }
.filter-toggle { display: none; }
.load-more { display: flex; justify-content: center; margin-top: 32px; }
.dim { opacity: 0.55; transition: opacity 0.15s; }

/* product page */
.crumbs { padding: 20px var(--gutter) 0; font-size: 0.95rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.pdp { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 64px); padding: 20px var(--gutter) 72px; align-items: start; }
.gallery-main { aspect-ratio: 1 / 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); cursor: pointer; }
.thumb[aria-current="true"] { border-color: var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 12px; }
.pdp-price { font-size: 1.6rem; font-weight: 800; margin-bottom: 18px; }
.pdp-group { margin: 0 0 20px; border: 0; padding: 0; }
.pdp-group legend { font-weight: 800; margin-bottom: 10px; padding: 0; }
.buy-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: var(--radius-control); background: #fff; }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font: 700 1.3rem var(--font-body); cursor: pointer; color: var(--ink); }
.stepper button[disabled] { opacity: 0.35; cursor: not-allowed; }
.stepper output { min-width: 32px; text-align: center; font-weight: 800; }
.note { margin: 12px 0 0; color: var(--muted); font-size: 0.95rem; }
.prose { margin-top: 28px; }
.prose img { border-radius: var(--radius-md); }
.accordion details { border-top: 1px solid var(--line); padding: 14px 0; }
.accordion details:last-child { border-bottom: 1px solid var(--line); }
.accordion summary { font-weight: 800; cursor: pointer; }
.notify { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.notify[hidden] { display: none; }
.notify-row { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.notify-row .input { flex: 1; min-width: 180px; }

/* cart drawer */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(58, 42, 30, 0.55); display: flex; justify-content: flex-end; }
.backdrop[hidden] { display: none; }
.drawer { width: min(440px, 100%); height: 100%; background: var(--bg); display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(0,0,0,0.2); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-close { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.6rem; cursor: pointer; color: var(--ink); border-radius: var(--radius-control); }
.drawer-close:hover { background: var(--surface-2); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.line { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-img { width: 76px; height: 76px; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); }
.line-img img { width: 100%; height: 100%; object-fit: cover; }
.line-name { font-weight: 800; margin-bottom: 2px; }
.line-meta { font-size: 0.9rem; color: var(--muted); }
.line-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.line .stepper button { width: 36px; height: 36px; }
.line-warn { color: var(--destructive); font-size: 0.9rem; font-weight: 700; margin-top: 4px; }
.drawer-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.totals { margin-bottom: 14px; }
.totals-row { display: flex; justify-content: space-between; padding: 3px 0; }
.totals-row.total { font-weight: 800; font-size: 1.15rem; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line); }
.coupon { display: flex; gap: 8px; margin-bottom: 14px; }
.coupon .input { min-height: 40px; }

/* contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); padding: 8px var(--gutter) 80px; align-items: start; }
.form-card { padding: clamp(20px, 3vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 800; margin-bottom: 6px; }
.help { color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.thanks { text-align: center; padding: 24px 8px; }
.thanks h2 { margin-bottom: 12px; }
.aside-card { padding: 26px; border-radius: var(--radius-lg); background: var(--surface-2); }
.aside-card h3 { margin-bottom: 8px; }

/* footer */
.site-footer { background: var(--ink); color: #e9dcc7; padding: 48px var(--gutter) 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer p { max-width: 34em; margin: 0; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { text-decoration: none; font-weight: 700; color: #fff; }
.footer-links a:hover { text-decoration: underline; }
.legal { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.18); font-size: 0.9rem; }

@media (max-width: 880px) {
  .hero, .pdp, .contact { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; order: -1; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: none; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
  .filters.is-open { display: flex; }
  .filter-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .header-inner { gap: 8px; }
  .brand { font-size: 1.25rem; }
  .nav a { padding: 8px 10px; }
  .cart-label { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-body { padding: 12px; }
  .btn { padding: 0 18px; }
}