* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --ink: #191c19;
  --muted: #555b50;
  --line: #dedfd7;
  --paper: #f5f5ef;
  --surface: #fffefa;
  --olive: #3e4c34;
  --accent: #e6ef7b;
  --radius: 12px;
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.5; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #627626; outline-offset: 4px; }
button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .64rem .9rem;
  background: var(--surface);
  font-weight: 650;
}
button:hover { border-color: #838d75; }
button:disabled { opacity: .45; cursor: default; }
.primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.primary:hover:not(:disabled) { background: var(--olive); border-color: var(--olive); }
.wrap, .top-inner { max-width: 1376px; padding-inline: 48px; margin-inline: auto; }
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; min-height: 76px; gap: 18px; justify-content: space-between; align-items: center; }
.brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  flex: 0 0 auto;
}
.brand img { width: 172px; height: auto; display: block; mix-blend-mode: multiply; }

nav { display: flex; gap: 3px; justify-content: end; align-items: center; }
nav button { background: transparent; border-color: transparent; white-space: nowrap; font-size: .9rem; }
nav button:hover { border-color: transparent; background: #edeee5; }
nav button.active { background: #edeee5; }
nav .cart-nav { display: flex; align-items: center; gap: 7px; margin-inline: 4px; }
.cart-count { padding: 1px 6px; min-width: 22px; text-align: center; border-radius: 99px; background: #e5e9d7; color: #26321a; font-size: .78rem; }
nav .account-nav { color: #fff; background: var(--ink); }
nav .account-nav:hover { color: #fff; background: var(--olive); }
.pill { display: inline-block; padding: .25rem .6rem; border-radius: 99px; background: #e8eadf; color: #37442d; font-size: .82rem; font-weight: 700; }
.hero {
  display: grid;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  min-height: clamp(400px, 41vw, 580px);
  background: #202522;
  color: #fff;
  margin-top: 24px;
  border-radius: var(--radius);
  touch-action: pan-y;
  --hero-accent: var(--accent);
  --hero-body: #edf0e6;
  --hero-control-border: #ffffff65;
  --hero-control-surface: #171c19a0;
}
.hero[data-slide="0"] {
  color: #171b18;
  --hero-accent: #37482a;
  --hero-body: #343a34;
  --hero-control-border: #2c352d65;
  --hero-control-surface: #f8f9f2bb;
}
.hero-image, .hero-image::after { position: absolute; inset: 0; }
.hero-image {
  z-index: -1;
  margin: 0;
  background: #202522;
  opacity: 0;
  transition: opacity .42s ease;
}
.hero[data-slide="0"] .hero-image-1,
.hero[data-slide="1"] .hero-image-2,
.hero[data-slide="2"] .hero-image-3,
.hero[data-slide="3"] .hero-image-4 { opacity: 1; }
.hero-image::after { content: ""; background: linear-gradient(90deg, #121612f5 0%, #151914bb 26%, #15191422 55%, transparent 74%); }
.hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 36%; display: block; }
.hero-image-1 { background: #e7e8e3; }
.hero-image-1, .hero[data-slide="0"] .hero-image { transition: none; }
.hero-image-1::after { background: linear-gradient(90deg, #f5f5f0b0, #f5f5f018 51%, transparent 67%); }
.hero-image-1 img { object-position: center 38%; }
.hero-image-2 img { object-position: center 31%; }
.hero-image-3 img { margin-left: auto; width: 86%; object-position: center 37%; }
.hero-image-4 { background: #1c2a2e; }
.hero-image-4 img { margin-left: auto; width: 66%; object-position: center 31%; }
.hero-image-4::after { background: linear-gradient(90deg,#182024 34%,#182024a8 43%,#18202400 66%); }
.hero-copy { align-self: center; padding: clamp(26px, 5.8vw, 82px); padding-bottom: max(65px, 5.8vw); max-width: 670px; }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; color: var(--hero-accent); font-size: .77rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.hero-tag::before { width: 22px; height: 2px; content: ""; background: currentColor; }
.hero h1 { margin: 17px 0 20px; font-size: clamp(3.05rem, 6.5vw, 6rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 900; }
.hero h1 span { display: block; color: var(--hero-accent); }
.hero p { max-width: 355px; margin: 0 0 27px; color: var(--hero-body); font-size: .98rem; }
.hero-cta { color: #1c2415; background: var(--accent); border-color: var(--accent); padding: .76rem 1.2rem; }
.hero-cta:hover { background: #f1f7ac; border-color: #f1f7ac; }
.hero[data-slide="0"] .hero-cta { color: white; background: #1d261b; border-color: #1d261b; }
.hero[data-slide="0"] .hero-cta:hover { background: #394735; border-color: #394735; }
.hero-controls {
  position: absolute;
  right: clamp(14px, 3.1vw, 44px);
  bottom: clamp(14px, 2.4vw, 30px);
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--hero-control-surface);
  border: 1px solid var(--hero-control-border);
  border-radius: 99px;
  padding: 2px 6px;
}
.hero-controls button { position: relative; display: grid; place-items: center; border: 0; background: transparent; color: inherit; width: 30px; height: 34px; padding: 0; }
.hero-controls button:focus-visible { outline-color: currentColor; outline-offset: 0; }
.hero-dot::before { content: ""; width: 6px; height: 6px; border-radius: 10px; background: currentColor; opacity: .58; transition: width .2s; }
.hero-dot[aria-pressed="true"]::before { width: 17px; opacity: 1; }
.hero-controls button:hover { background: #7a88702e; }
.hero-toggle::before { content: ""; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.hero-toggle.is-playing::before { box-sizing: content-box; width: 3px; height: 11px; border: 0; border-inline: 2px solid currentColor; }

.heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 40px 0 21px; }
.heading h1, .heading h2 { margin: 0; letter-spacing: -.055em; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.12; }
.heading p { margin: 8px 0 0; }
.catalog-heading { scroll-margin-top: 24px; }
.catalog-heading select { background-color: var(--surface); }
.catalog-controls { min-width: 164px; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .875rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card, .panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card { overflow: hidden; transition: border-color .18s; }
.card:hover { border-color: #a4a891; }
.card-photo { aspect-ratio: 1.34; position: relative; overflow: hidden; background: #e0e0d7; }
.card-photo img { position: absolute; display: block; max-width: none; pointer-events: none; }
.card-photo img.single { width: 100%; height: 100%; inset: 0; object-fit: cover; }
.catalog-photo { top: 50%; width: 300%; transform: translateY(-50%); }
.catalog-photo.s10 { left: 0; }
.catalog-photo.s42 { left: -100%; }
.catalog-photo.s79 { left: -200%; }
.model-code { position: absolute; top: 12px; left: 12px; padding: .28rem .52rem; border-radius: 5px; color: #2c3026; background: #f9f9f1; font-family: "Consolas", monospace; font-size: .85rem; font-weight: 700; }
.card-body, .panel { padding: 20px; }
.card h3 { margin: 0 0 9px; font-size: 1.12rem; line-height: 1.35; }
.card h3, .price { letter-spacing: -.035em; }
.price { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stock { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #6d833d; }
.stock.empty::before { background: #a16c49; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
label { display: grid; gap: 5px; font-size: .875rem; font-weight: 650; }
input, select {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  padding: .53rem .62rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffefa;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #5d6257 50%), linear-gradient(135deg, #5d6257 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 27px;
}
.qty { max-width: 75px; }
.card-buy { align-items: stretch; }
.card-buy button { flex: 1; }
.panels { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.panel + .panel { margin-top: 12px; }
.panels > .panel + .panel { margin: 0; }
.panel h2, .panel h3 { margin: 0 0 12px; }
.line { padding: 11px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.notice { padding: 11px 13px; margin: 13px 0; border: 1px solid #dedeba; border-radius: 7px; background: #f2f1dc; }
.order-list { display: grid; gap: 12px; }
.order-list .panel { margin-top: 0; }
.order-list .panel p { overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.full { grid-column: 1/-1; }
.footer { margin-top: 56px; padding-block: 22px; border-top: 1px solid var(--line); color: var(--muted); display: flex; gap: 12px; justify-content: space-between; font-size: .85rem; }
.footer span:first-child { font-weight: 700; color: var(--ink); }
dialog { width: min(460px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #151912bd; }
dialog h2 { margin: 0; }
#toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 10; background: var(--ink); color: #fff; border: 1px solid #c0c69b; padding: .7rem 1rem; border-radius: 7px; max-width: calc(100% - 24px); width: max-content; }
#toast:empty, #print-sheet { display: none; }
@media (max-width: 1010px) {
  .wrap, .top-inner { padding-inline: 26px; }
  .card-body { padding: 15px; }
}
@media (max-width: 800px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 610px) {
  .wrap, .top-inner { padding-inline: 14px; }
  .top-inner { min-height: 65px; padding-block: 10px; gap: 9px; flex-wrap: wrap; }
  .brand img { width: 145px; }
  nav { gap: 0; width: 100%; justify-content: space-between; flex-wrap: wrap; }
  nav button { padding: .43rem .42rem; font-size: .82rem; }
  nav .cart-nav { margin-inline: 0; gap: 3px; }
  .hero { margin-top: 12px; min-height: 440px; align-items: end; }
  .hero-image img { position: absolute; inset: 0; width: 100%; height: 83%; }
  .hero-image-1 { background: #f1f2ed; }
  .hero-image-1 img { height: 75%; object-position: 60% 24%; }
  .hero-image-2 img { object-position: 55% 20%; }
  .hero-image-3 img { object-position: 44% 28%; }
  .hero-image-4 img { object-position: center 38%; }
  .hero-image::after { background: linear-gradient(0deg,#161c18 0%,#161c18fa 22%,#161c18b0 46%,transparent 69%); }
  .hero-image-1::after { background: linear-gradient(0deg,#f1f2ed 0%,#f1f2edfa 23%,#f1f2edc7 47%,transparent 71%); }
  .hero-copy { padding: 20px 20px 56px; align-self: end; }
  .hero-controls { right: 12px; bottom: 9px; }

  .hero h1 { margin-block: 10px 12px; font-size: clamp(2.45rem, 11vw, 4rem); }
  .hero p { margin-bottom: 17px; }
  .grid, .panels { grid-template-columns: 1fr; }
  .heading { margin-block: 28px 16px; align-items: end; }
  .catalog-controls { min-width: 115px; max-width: 45%; }
  .card-photo { aspect-ratio: 1.45; }
  .footer { margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; } }
@media print {
  body > * { display: none !important; }
  body > #print-sheet { display: block !important; color: #111; background: #fff; padding: 22px; }
  #print-sheet .row { border-bottom: 1px solid #ccc; padding: 9px 0; }
}

.admin-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.admin-tabs { display:flex; flex-wrap:wrap; gap:7px; }
.admin-tabs button[aria-pressed="true"] { background:#e9edda; border-color:#cdd4bb; color:#28331f; }
.admin-search { margin:18px 0 10px; max-width:360px; }
.admin-scroll { width:100%; overflow-x:auto; }
.admin-table { width:100%; border-collapse:collapse; text-align:left; }
.admin-table th { font-size:.82rem; color:var(--muted); background:#f1f2e9; white-space:nowrap; }
.admin-table th, .admin-table td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
.admin-table td { font-size:.91rem; }
.admin-table tbody tr:last-child td { border-bottom:0; }
.admin-table small { display:block; margin-top:2px; color:var(--muted); }
.admin-table button { padding:.34rem .65rem; white-space:nowrap; }
.admin-editor { margin-bottom:14px; }
.admin-editor[hidden], .admin-table tr[hidden], .order-list article[hidden] { display:none; }
.admin-editor .row h2 { margin:0; }
.admin-editor .fields { max-width:780px; }
.admin-check { display:flex; align-items:center; align-self:center; gap:8px; }
.admin-check input { width:17px; height:17px; min-height:0; accent-color:var(--olive); }
.admin-product-image { max-width:160px; max-height:110px; object-fit:contain; border-radius:7px; }
.admin-probe .fields { max-width:760px; }
.admin-probe .notice p { margin:.35rem 0 0; }
.admin-order-tools { margin-bottom:14px; }
.admin-order-tools label { max-width:380px; margin-top:16px; }
.admin-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.admin-stats div { padding:12px; border-radius:7px; background:#f0f2e5; color:var(--muted); }
.admin-stats strong { display:block; margin-top:2px; color:var(--ink); font-size:1.5rem; }
@media(max-width:610px) {
  .admin-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-table th,.admin-table td { padding:9px; white-space:nowrap; }
  .admin-editor,.admin-list,.admin-probe { padding:14px; }
}
.admin-store-link { display:inline-block; margin-left:16px; color:var(--olive); }
