:root{font-family:"Microsoft YaHei",system-ui,sans-serif;color:#19251f;background:#f5f6f0;--green:#164b36;--muted:#53635a;--line:#dfe6dc}
*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}button,input{font:inherit}button{cursor:pointer}h1,h2,p{margin:0}.wrap{width:min(1120px,calc(100% - 36px));margin-inline:auto}.bar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:68px;flex-wrap:wrap}header,footer{background:#fff;border-block-end:1px solid var(--line)}.brand{font-weight:800;font-size:21px}.brand span{font-size:12px;letter-spacing:.15em}.brand span{color:var(--muted)}nav{display:flex;gap:clamp(12px,3vw,30px);font-size:14px}nav a:hover,footer a:hover{text-decoration:underline}.primary{display:inline-block;background:#c8ed8f;color:#173e30;border:0;border-radius:10px;padding:12px 20px;font-weight:750}.primary:hover{background:#b8df7b}.section-head{display:flex;justify-content:space-between;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:18px}.section-head p,#product-stock{color:var(--muted);margin-top:7px}input{background:#fff;border:1px solid #aebdb2;border-radius:10px;padding:10px 13px;max-width:100%}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr));gap:16px}.card{background:#fff;color:inherit;border:1px solid var(--line);border-radius:16px;padding:10px;text-align:left;transition:box-shadow .2s,transform .2s;min-width:0}.card:hover{box-shadow:0 8px 20px #173e301a;transform:translateY(-3px)}.card img,#product-image{width:100%;aspect-ratio:4/3;object-fit:contain;background:#f1f4ed;border-radius:10px;display:block}.card-name{display:block;font-weight:750;margin:12px 4px 8px;overflow-wrap:anywhere}.card-meta{display:flex;align-items:center;justify-content:space-between;gap:5px;margin:0 4px 5px}.price{font-weight:800;color:var(--green)}.stock{font-size:12px;color:var(--muted)}dialog{border:0;border-radius:20px;width:min(440px,calc(100% - 28px));padding:20px;color:inherit;box-shadow:0 18px 60px #0004}dialog::backdrop{background:#10231ccc}.close{position:absolute;right:12px;top:12px;border:1px solid var(--line);border-radius:50%;background:#fff;width:38px;height:38px;font-size:25px}.dialog-copy{padding:16px 0 0}.dialog-copy .price{font-size:23px;margin-top:8px}.buy{width:100%;margin-top:16px}:focus-visible{outline:3px solid #427449;outline-offset:3px}@media(max-width:490px){.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.card-meta{flex-wrap:wrap}.bar{padding-block:10px}}

/* Storefront theme */
:root {
  color: #24243a;
  background: #faf7f2;
  --green: #a93f34;
  --muted: #625c70;
  --line: #e9e2ea;
}
header { background: #fffdf9; }
.brand span { color: #85473d; }
nav a { padding: 8px 0; }
nav a:hover, footer a:hover { color: #a93f34; }
.primary { background: #ffc1a6; color: #48263c; }
.primary:hover { background: #ffab8b; }
.section-head h2 { color: #33254a; }
input { border-color: #cfc3d5; }
.card {
  padding: 12px;
  border-color: #eae1e9;
  box-shadow: 0 3px 9px #35254d0a;
}
.card:hover { border-color: #ad90c4; box-shadow: 0 12px 24px #35254d1f; }
.card img, #product-image { background: #f1ecf7; }
.stock { border-radius: 20px; background: #f3edf8; padding: 3px 7px; }
footer { margin-top: 48px; background: #29223f; color: #f8eefa; }
footer a:hover { color: #ffd2bd; }
dialog::backdrop { background: #221a36c9; }
:focus-visible { outline-color: #8955a7; }
@media (max-width: 490px) {
  .card { padding: 8px; }
}

.quantity-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.quantity-controls { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; }
.quantity-controls button { width: 42px; height: 40px; border: 0; border-radius: 9px; background: #f3edf8; color: #33254a; font-size: 20px; }
.quantity-controls button:disabled { opacity: .45; cursor: default; }
.quantity-controls output { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }

.card {
  --card-tint: #ece2f8;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}
.card:nth-child(3n + 2) { --card-tint: #f9e1d7; }
.card:nth-child(3n) { --card-tint: #e1e8fb; }
.card-media {
  display: block;
  padding: clamp(12px, 2vw, 22px);
  background: radial-gradient(ellipse at 20% 12%, #fff9, transparent 65%), var(--card-tint);
  border-bottom: 1px solid #2720370b;
}
.card img {
  aspect-ratio: 1;
  background: #ffffff85;
  border: 1px solid #fff;
  border-radius: 14px;
  transition: transform .2s ease;
}
.card:hover img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; padding: 13px; }
.card-name { margin: 0 0 8px; font-size: 16px; }
.card-meta { margin: auto 0 0; }
.card .price { font-size: 18px; }
.card .stock { white-space: nowrap; }
.card-action {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 9px 6px;
  border-radius: 9px;
  background: #ffc1a6;
  color: #48263c;
  text-align: center;
  font-size: 13px;
  font-weight: 750;
}
.card-action span { font-size: 16px; }
.card:hover .card-action, .card:focus-visible .card-action { background: #ffab8b; }
@media (max-width: 490px) {
  .card-body { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card img { transition: none; }
  .card:hover, .card:hover img { transform: none; }
}

.card .stock { color: #be185d; background: #fce7f3; font-weight: 700; }
#product-stock { color: #be185d; font-weight: 700; }

header {
  width: min(1200px, calc(100% - 28px));
  margin: 12px auto 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 5px 18px #35254d12;
}
header .bar { min-height: 60px; }
@media (max-width: 490px) {
  header { border-radius: 24px; }
  header .bar { gap: 6px 16px; }
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 300px;
  margin: 28px 0 42px;
  padding: clamp(26px, 6vw, 68px);
  border-radius: 24px;
  color: #fff;
  background: radial-gradient(ellipse at 86% 20%, #754e9c 0%, transparent 47%),
    linear-gradient(120deg, #222241 12%, #402859 100%);
  box-shadow: 0 18px 38px #35254d26;
}
.hero > div { position: relative; z-index: 1; }
.hero .eyebrow { color: #ffd2bd; font-size: 12px; letter-spacing: .15em; }
.hero h1 { font-size: clamp(34px, 6vw, 65px); margin: 10px 0; }
.hero .primary { margin-top: 23px; }
.hero::before, .hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  right: clamp(-125px, 1vw, 24px);
  top: 50%;
  width: clamp(240px, 36vw, 430px);
  aspect-ratio: 1.55;
  border-radius: 28px;
  transform: translateY(-56%) rotate(-15deg);
  border: 1px solid #ffffff50;
  background: linear-gradient(135deg, #ffb99765, #bd87f134);
}
.hero::after {
  right: clamp(-170px, -2vw, -20px);
  transform: translateY(-30%) rotate(12deg);
  background: repeating-linear-gradient(135deg, #f6d0ff24 0 1px, transparent 1px 14px);
}
@media (max-width: 490px) {
  .hero { min-height: 248px; }
  .hero::before, .hero::after { opacity: .48; }
}
