:root {
  color-scheme: light;
  --paper: #f8f5ef;
  --surface: #fffcf8;
  --ink: #272320;
  --muted: #605850;
  --accent: #873227;
  --accent-hover: #6f281f;
  --tint: #f0e5db;
  --line: #e4d8ce;
  --radius: 20px;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
body:has(dialog[open]) { overflow: hidden; }
button { font: inherit; }
a { color: inherit; }
button:enabled { cursor: pointer; }
button:disabled { opacity: .45; }
:focus-visible { outline: 3px solid #94532b; outline-offset: 3px; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, figure { margin: 0; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.skip, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus {
  z-index: 9;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 12px;
  background: white;
  clip-path: none;
}
.demo-bar { color: #fff7f0; background: #3c2c27; }
.demo-bar-inner {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.demo-bar-inner > :first-child {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  letter-spacing: .085em;
}
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: #e9ae7a; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 54px; height: 42px; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; line-height: 1.18; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.cart-button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px 6px 13px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}
.cart-button:hover { border-color: var(--accent); }
.cart-count {
  min-width: 25px;
  padding: 3px 6px;
  border-radius: 6px;
  color: white;
  background: var(--accent);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin-top: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f2e9df;
}
.hero-copy { padding: clamp(30px, 5vw, 62px); align-self: center; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .105em;
  font-weight: 800;
}
.eyebrow > span { width: 15px; height: 2px; flex: none; background: currentColor; }
h1 { margin-top: 12px; font-size: clamp(42px, 5.9vw, 76px); letter-spacing: -.057em; line-height: 1.02; }
.hero-lead { max-width: 350px; margin-top: 16px; color: var(--muted); font-size: 18px; line-height: 1.5; }
.hero-button { margin-top: 24px; }
.hero-photo { min-height: 302px; position: relative; }
.hero-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.hero-photo figcaption {
  position: absolute;
  inset: auto 14px 14px auto;
  padding: 6px 10px;
  border-radius: 6px;
  color: white;
  background: #29221deb;
  font-size: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.22;
  text-align: center;
  text-decoration: none;
}
.button.primary { background: var(--accent); color: white; }
.button.primary:hover:enabled, a.button.primary:hover { background: var(--accent-hover); }
.button.secondary { background: var(--surface); color: var(--accent); border-color: #d8bdb0; }
.button.secondary:hover { background: #f8eee5; }

.catalog { margin-top: 39px; padding-bottom: 53px; scroll-margin-top: 96px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin-top: 4px; font-size: clamp(27px, 4vw, 42px); letter-spacing: -.04em; }
.section-count { flex: none; color: var(--muted); font-size: 14px; padding-bottom: 3px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.product {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.product-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
}
.product-image:focus-visible { outline-offset: -4px; }
.product-image img { width: 100%; height: auto; aspect-ratio: 400 / 244; object-fit: cover; }
.product-copy { display: flex; flex-direction: column; flex: 1; padding: 17px; }
.product-tag { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.product h3 { margin-top: 4px; font-size: 22px; line-height: 1.18; letter-spacing: -.025em; }
.product-copy > p:not(.product-tag) { margin-top: 7px; margin-bottom: 16px; color: var(--muted); font-size: 14px; line-height: 1.43; }
.product-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-top: auto; }
.product-price { font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail-link {
  min-height: 44px;
  margin-top: 5px;
  padding: 3px 0;
  align-self: flex-start;
  color: var(--accent);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 650;
}
.detail-link:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid var(--line); background: #efe8df; }
.footer-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-brand img { object-fit: contain; }
.footer-inner a { font-weight: 650; text-underline-offset: 3px; }

dialog {
  width: min(540px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100% - 24px);
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 90px #2e211d40;
}
dialog::backdrop { background: #241d1ab8; }
.dialog-shell { position: relative; padding: 25px; }
.dialog-close {
  position: absolute;
  right: 15px;
  top: 15px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}
.dialog-close:hover { background: var(--tint); }
.dialog-title { margin-top: 5px; padding-right: 44px; font-size: clamp(26px, 5vw, 35px); line-height: 1.12; letter-spacing: -.045em; }
.dialog-title:focus { outline: none; }
.dialog-intro { margin-top: 10px; color: var(--muted); line-height: 1.45; }
.detail-image { width: 100%; height: auto; aspect-ratio: 400 / 214; object-fit: cover; margin-top: 16px; border-radius: 10px; }
.detail-price { margin-top: 12px; font-size: 24px; font-weight: 800; }
.detail-price small { font-size: 13px; color: var(--muted); }
.detail-actions { margin-top: 12px; display: flex; gap: 12px; align-items: center; }
.detail-actions .button { flex: 1; }

.stepper { flex: none; display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.stepper button {
  min-width: 43px;
  min-height: 43px;
  background: #f5eee7;
  color: var(--ink);
  border: 0;
  font-size: 20px;
  font-weight: 700;
}
.stepper button:hover:enabled { background: #ead9cd; }
.stepper button:focus-visible { outline-offset: -4px; }
.stepper output { min-width: 32px; text-align: center; font-weight: 700; }

.cart-list { list-style: none; padding: 0; margin: 13px 0 0; }
.cart-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item img { width: 56px; height: 48px; object-fit: cover; border-radius: 6px; }
.cart-item-name { display: block; line-height: 1.2; font-weight: 700; }
.cart-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.cart-item-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.remove {
  min-height: 36px;
  padding: 2px 0;
  background: transparent;
  color: var(--accent);
  border: 0;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 17px; }
.total strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.dialog-buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.dialog-buttons .button.primary { flex: 1 1 auto; }
.review-list { list-style: none; margin: 14px 0 0; padding: 0; }
.review-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.review-list li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.demo-note { margin-top: 14px; padding: 10px 12px; background: var(--tint); color: var(--ink); font-size: 14px; line-height: 1.4; border-radius: 7px; }
.success-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 11px; border-radius: 50%; color: var(--accent); background: var(--tint); font-size: 26px; font-weight: 800; }

@media (max-width: 820px) {
  .hero-copy { padding: 30px; }
  .product-grid { gap: 11px; }
  .product-copy { padding: 13px; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .demo-bar-inner { font-size: 10.5px; min-height: 31px; gap: 6px; }
  .demo-bar-inner > :first-child { gap: 5px; letter-spacing: .06em; }
  .demo-dot { width: 5px; height: 5px; }
  .header-inner { min-height: 63px; gap: 10px; }
  .brand img { width: 42px; height: 36px; }
  .brand { gap: 6px; }
  .brand strong { font-size: 16px; }
  .cart-button { padding-inline: 8px; gap: 5px; }
  .cart-button svg { width: 17px; }
  .hero { margin-top: 16px; grid-template-columns: 1fr; border-radius: 15px; }
  .hero-copy { padding: 24px 20px 22px; }
  h1 { font-size: clamp(39px, 10vw, 57px); }
  .hero-lead { margin-top: 10px; font-size: 16px; }
  .hero-button { margin-top: 15px; }
  .hero-photo { min-height: 148px; }
  .hero-photo figcaption { inset: auto 8px 8px auto; }
  .catalog { margin-top: 27px; padding-bottom: 33px; scroll-margin-top: 80px; }
  .section-head { margin-bottom: 13px; }
  .section-head h2 { font-size: clamp(25px, 7vw, 36px); }
  .section-count { font-size: 12px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-copy { padding: 12px; }
  .product h3 { font-size: 19px; }
  .product-copy > p:not(.product-tag) { font-size: 13px; margin-bottom: 12px; }
  .product-actions .button { width: 100%; padding-inline: 5px; }
  .footer-inner { padding: 18px 0; align-items: flex-start; flex-direction: column; gap: 9px; }
  dialog { width: 100%; margin: auto 0 0; max-height: calc(100% - 10px); max-height: calc(100dvh - 10px); border-radius: 18px 18px 0 0; }
  .dialog-shell { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .cart-item { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; }
  .cart-item img { width: 42px; }
  .stepper button { min-width: 41px; }
  .stepper output { min-width: 23px; }
  .brand small { font-size: 11px; }
  .product h3 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
