:root {
  color-scheme: light;
  --ink: #232a21;
  --muted: #565e51;
  --paper: #f8f7f2;
  --white: #fffefb;
  --green: #263c2c;
  --line: #dfdfd4;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid #577748; outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.visually-hidden, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 10; top: 12px; left: 12px; background: white; padding: 12px; }

.top { border-bottom: 1px solid var(--line); }
.top-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 17px; line-height: 1.12; font-weight: 760; letter-spacing: .07em; }
.brand-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .16em; font-weight: 500; }
nav { display: flex; gap: 32px; color: var(--muted); font-size: 14px; }
nav a:hover, footer a:hover { text-decoration: underline; text-underline-offset: .22em; }
.bag-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  font-size: 13px;
}
.bag-trigger svg, .search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
#cart-count { display: grid; min-width: 22px; height: 22px; padding-inline: 4px; place-items: center; border-radius: 12px; background: #e4eadc; color: var(--green); font-variant-numeric: tabular-nums; }

.hero {
  margin-top: 32px;
  display: grid;
  grid-template-columns: .91fr 1.09fr;
  border-radius: 20px;
  background: #eef0e3;
  overflow: hidden;
}
.hero-copy { align-self: center; padding: clamp(30px, 4.5vw, 66px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #4d5d47; font-size: 11px; font-weight: 720; letter-spacing: .16em; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #647b58; }
h1, h2, h3, p, figure { margin: 0; }
h1 { margin-top: 16px; font-size: clamp(35px, 4.4vw, 64px); line-height: 1.15; font-weight: 760; letter-spacing: -.06em; }
.hero-copy p { margin: 21px 0 28px; max-width: 31ch; color: var(--muted); line-height: 1.8; font-size: 15px; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-radius: 7px;
  color: #fffef6;
  background: var(--green);
  font-size: 14px;
  font-weight: 650;
}
.primary:hover { background: #374f3a; }
.hero-art { position: relative; min-width: 0; min-height: 350px; background: #b8c7a4; }
.hero-art svg { display: block; position: absolute; width: 100%; height: 100%; }
.hero-art figcaption {
  position: absolute;
  inset: auto 22px 15px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #2e4232;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
}

.catalog { padding: 54px 0 64px; }
.catalog-title, .toolbar, .price-row, .footer-inner, .dialog-head, .subtotal { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.catalog-title { align-items: end; }
.catalog h2 { font-size: clamp(29px, 3vw, 42px); margin-top: 8px; letter-spacing: -.04em; }
.sample { color: var(--muted); font-size: 12px; }
.toolbar { margin: 22px 0 19px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filters button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 8px 14px;
  min-height: 36px;
  font-size: 13px;
}
.filters button[aria-pressed="true"] { color: white; background: var(--green); border-color: var(--green); }
.filters button:hover:not([aria-pressed="true"]), .bag-trigger:hover { background: #eef0e6; }
.search { display: flex; align-items: center; gap: 7px; width: 220px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--muted); }
.search svg { flex: none; }
.search input { min-width: 0; width: 100%; border: 0; color: var(--ink); background: transparent; font-size: 14px; }
.search:focus-within { outline: 2px solid #577748; outline-offset: 2px; }
.search input:focus { outline: none; }

.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--white); overflow: hidden; }
.product-media { display: block; width: 100%; padding: 0; border: 0; background: #eae9df; }
.product-media:focus-visible { outline-offset: -5px; }
.art { display: block; width: 100%; }
.product-media .art { aspect-ratio: 4/3; }
.product-info { padding: 16px 17px 17px; }
.category { font-size: 12px; color: var(--muted); }
.product h3 { margin: 6px 0 11px; font-size: 17px; }
.price { font-weight: 720; font-variant-numeric: tabular-nums; }
.icon { display: grid; place-items: center; padding: 0; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); font-size: 21px; line-height: 1; }
.icon:not(:disabled):hover { background: #e7edde; }
.empty { grid-column: 1 / -1; padding: 36px 16px; text-align: center; color: var(--muted); line-height: 1.7; }
footer { background: #eaece2; }
.footer-inner { min-height: 100px; padding-block: 20px; }
footer strong { font-size: 14px; }
footer p, footer a { color: var(--muted); font-size: 12px; line-height: 1.6; }
footer p { margin-top: 5px; }

dialog { padding: 0; border: 1px solid var(--line); color: var(--ink); background: var(--white); }
dialog::backdrop { background: rgb(24 34 27 / 45%); }
body:has(dialog[open]) { overflow: hidden; }
.modal { width: min(480px, calc(100% - 30px)); max-height: calc(100dvh - 30px); border-radius: 15px; }
.dialog-head { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 23px; }
.dialog-content { padding: 20px; }
.dialog-content h2 { margin-top: 5px; }
.dialog-content p { margin: 9px 0 20px; line-height: 1.7; color: var(--muted); }
#detail-body > .art { aspect-ratio: 16/9; }
.cart { width: min(460px, 100%); height: 100%; max-height: 100%; max-width: 100%; margin: 0 0 0 auto; }
.cart[open] { display: flex; flex-direction: column; }
.cart-body { flex: 1; overflow: auto; padding: 0 20px; }
.cart-item { display: grid; grid-template-columns: 63px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.cart-item .art { border-radius: 7px; }
.cart-item h3 { font-size: 14px; margin-bottom: 5px; }
.cart-item .price { font-size: 13px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .icon { width: 34px; height: 34px; }
.stepper span { min-width: 22px; text-align: center; font-size: 13px; }
.cart-footer { border-top: 1px solid var(--line); padding: 18px 20px max(20px, env(safe-area-inset-bottom)); }
.cart-footer .primary { width: 100%; }
.cart-footer p { margin: 8px 0 14px; color: var(--muted); font-size: 12px; }
.checkout-summary { padding-top: 36px; line-height: 1.7; }
.checkout-summary p { margin: 6px 0 17px; color: var(--muted); }
.toast { display: none; position: fixed; z-index: 2; bottom: 23px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 8px; background: var(--green); color: white; font-size: 14px; }
.toast:not(:empty) { display: block; }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 40px); }
  .hero-copy { padding: 32px; }
  .hero-art { min-height: 310px; }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .top-inner { min-height: 60px; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; margin-top: 18px; }
  .hero-copy { padding: 26px 24px; }
  .hero-copy p { margin: 14px 0 19px; }
  .hero-art { min-height: 0; aspect-ratio: 1.64; }
  .hero-art figcaption { inset: auto 12px 10px; }
  .catalog { padding: 36px 0 44px; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .search { width: 100%; min-height: 39px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-info { padding: 10px; }
  .product h3 { font-size: 15px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}
