:root {
  --ink: #1c1714;
  --muted: #6f675f;
  --paper: #f3efe7;
  --card: #fffdfb;
  --line: #e4dcd1;
  --accent: #ee4b2b;
  --accent-dark: #c7371c;
  --price: #c2410c;
  --good: #0f766e;
  --warn: #b45309;
  --bad: #be123c;
  --shadow: 0 14px 34px rgba(28, 23, 20, 0.08);
  --sans: "Segoe UI", "Helvetica Neue", sans-serif;
  --serif: Georgia, "Palatino Linotype", serif;
  --soft: #f6f1ea;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4efe8;
  --muted: #b7aea4;
  --paper: #14110f;
  --card: #221c18;
  --line: #3a322c;
  --accent: #ff6a4a;
  --accent-dark: #ff866c;
  --price: #ffb089;
  --good: #5eead4;
  --warn: #fbbf24;
  --bad: #fb7185;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  --soft: #2c241f;
}
html[data-theme="dark"] .site-header {
  background: rgba(20, 17, 15, 0.92);
  border-bottom-color: rgba(255, 248, 240, 0.08);
}
html[data-theme="dark"] .search,
html[data-theme="dark"] .price-panel [data-act="price"].on,
html[data-theme="dark"] .user-panel a:hover,
html[data-theme="dark"] .user-panel button:hover,
html[data-theme="dark"] .pay label:has(input:checked),
html[data-theme="dark"] .ph,
html[data-theme="dark"] .thumbs button,
html[data-theme="dark"] .avatar,
html[data-theme="dark"] .gallery-editor .shot {
  background: var(--soft);
}
html[data-theme="dark"] .search:focus-within,
html[data-theme="dark"] .price-toggle,
html[data-theme="dark"] .price-panel,
html[data-theme="dark"] .account-link,
html[data-theme="dark"] .user-panel,
html[data-theme="dark"] .account-nav a,
html[data-theme="dark"] .account-nav button,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .cats button,
html[data-theme="dark"] .toolbar select,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .price-custom input,
html[data-theme="dark"] .box,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .btn.danger,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .stepper,
html[data-theme="dark"] .stepper button,
html[data-theme="dark"] .stepper input,
html[data-theme="dark"] .stepper span,
html[data-theme="dark"] .product .ph,
html[data-theme="dark"] #drawer,
html[data-theme="dark"] .skip,
html[data-theme="dark"] .gallery-nav {
  background: var(--card);
  color: var(--ink);
}
html[data-theme="dark"] .desc,
html[data-theme="dark"] .sum-line span,
html[data-theme="dark"] footer { color: var(--muted); }
html[data-theme="dark"] .foot a,
html[data-theme="dark"] .account-nav button { color: #ffb089; }
html[data-theme="dark"] .error { background: #3b1520; color: #fecdd3; }
html[data-theme="dark"] .empty { border-color: var(--line); }
html[data-theme="dark"] .toolbar select,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .price-custom input { border-color: var(--line); }
html[data-theme="dark"] .btn.danger { border-color: #7f1d32; }
html[data-theme="dark"] #toast { background: #f4efe8; color: #1c1714; }
html[data-theme="dark"] .price s { color: #a3988e; }
html[data-theme="dark"] .account-nav a.on,
html[data-theme="dark"] .cats button.on,
html[data-theme="dark"] .price-toggle.on {
  background: #f4efe8;
  color: #1c1714;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: white;
  padding: 8px 12px;
  border-radius: 10px;
  z-index: 80;
}
.skip:focus { top: 8px; }

.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hint { color: var(--muted); font-size: 14px; }
.topbar {
  background: var(--ink);
  color: #f6f0e8;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
}
.topbar b { color: #ffb089; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 252, 248, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(28, 23, 20, 0.08);
}
.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 20px;
}
.mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-family: var(--serif);
}
.search {
  display: flex;
  align-items: center;
  background: #f6f1ea;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px;
  min-width: 0;
  width: 100%;
}
.search:focus-within { border-color: var(--ink); background: white; }
.search input {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  width: 100%;
  outline: none;
}
.search button, .icon-btn, .btn, .cats button, .nav button, .linkish, .price-toggle, .price-panel button {
  cursor: pointer;
}
.search-cluster { display: flex; align-items: center; gap: 8px; min-width: 0; }
.search-cluster > .search { flex: 1; width: auto; }
.price-filter { position: relative; flex: none; }
.price-toggle {
  height: 48px;
  max-width: 168px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  font-weight: 800;
  padding: 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.price-toggle.on { background: var(--ink); color: white; border-color: var(--ink); }
.price-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(280px, calc(100vw - 32px));
  display: grid;
  gap: 4px;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.price-panel [data-act="price"] {
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 9px 10px;
  font-weight: 700;
}
.price-panel [data-act="price"].on { background: #f6f1ea; }
.price-custom {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  align-items: end;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.price-custom label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.price-custom input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  font: inherit;
  color: var(--ink);
}
.search button {
  border: 0;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.account-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font: inherit;
  color: inherit;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  max-width: 168px;
  cursor: pointer;
}
.account-link img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
#accountName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: #efe8de;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 28px;
  flex: none;
}
.avatar.small { width: 42px; height: 42px; font-size: 16px; }
.avatar.tiny { width: 32px; height: 32px; font-size: 14px; }
.avatar-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar-row .btn { margin-right: 8px; }
.account-nav p { display: flex; align-items: center; gap: 10px; }
.user-menu { position: relative; }
.user-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 190px;
  display: grid;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.user-panel a, .user-panel button {
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}
.user-panel a:hover, .user-panel button:hover { background: #f6f1ea; }
.account {
  display: grid;
  gap: 18px;
  align-items: start;
}
.account-nav { display: grid; gap: 4px; align-content: start; }
.account-nav a, .account-nav button {
  text-align: left;
  text-decoration: none;
  background: white;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 800;
  color: inherit;
  cursor: pointer;
}
.account-nav a.on { background: var(--ink); color: white; }
.account-nav button { color: #9a3412; }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.auth { width: min(460px, 100%); margin: 0 auto; }
.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  display: grid;
  place-items: center;
  position: relative;
}
#cartCount {
  display: none;
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}
#cartCount.on { display: grid; }

main { padding: 22px 0 64px; }

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 24px;
  padding: 32px;
  border-radius: 28px;
  background:
    radial-gradient(520px 240px at 100% 0%, rgba(238, 75, 43, 0.48), transparent 58%),
    #1c1714;
  color: #f8f3ec;
  overflow: hidden;
}
.kicker {
  color: #ffb089;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 8px 0 12px;
}
.lead { max-width: 48ch; color: #e7ddd3; font-size: 17px; }
.hero-actions, .pills, .form-actions, .buyrow, .row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions { margin: 18px 0; }
.pills span, .badge-soft {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  color: #f0e6dc;
}
.hero-side { display: grid; gap: 12px; align-content: end; }
.mini {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px;
  text-decoration: none;
}
.mini img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.mini b { display: block; font-size: 14px; }
.mini em { color: #ffb089; font-style: normal; font-weight: 800; }

.cats { display: flex; gap: 8px; overflow: auto; padding: 16px 0 6px; }
.cats button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 14px;
  white-space: nowrap;
}
.cats button.on { background: var(--ink); color: white; border-color: var(--ink); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 26px 0 12px;
}
.section-head h2, .page-title { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; }
.count { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--accent); }
.scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 210px);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.scroller .card { scroll-snap-align: start; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 8px 0 14px; }
.toolbar select, .field input, .field textarea, .field select, .panel select, #orderFilter {
  background: white;
  border: 1px solid #ddd4c8;
  border-radius: 12px;
  padding: 11px 12px;
}
.toolbar select, #orderFilter { width: auto; border-radius: 999px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-link { text-decoration: none; display: flex; flex-direction: column; min-height: 0; }
.ph {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #efe8de;
}
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery { display: grid; gap: 10px; }
.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 252, 248, 0.94);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-count {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(28, 23, 20, 0.72);
  color: white;
  font-size: 13px;
  font-weight: 800;
}
.thumbs { display: flex; gap: 8px; overflow: auto; }
.thumbs button {
  width: 68px;
  height: 68px;
  padding: 0;
  border-radius: 12px;
  border: 2px solid transparent;
  overflow: hidden;
  flex: none;
  background: #efe8de;
  cursor: pointer;
}
.thumbs button.on { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .ph img { transform: scale(1.04); }
.off, .badge-new {
  position: absolute;
  z-index: 1;
  top: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}
.off { left: 10px; background: var(--accent); color: white; }
.badge-new { right: 10px; background: var(--ink); color: white; }
.card h2 {
  font-size: 14.5px;
  line-height: 1.35;
  font-weight: 700;
  margin: 8px 0 4px;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}
.meta { color: var(--muted); font-size: 12px; }
.stars { color: #e0a106; letter-spacing: 1px; }
.reviews { margin-top: 28px; display: grid; gap: 12px; }
.reviews h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; }
.review { display: grid; gap: 6px; }
.review header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.who { display: flex; align-items: center; gap: 8px; }
.review-form { display: grid; gap: 12px; max-width: 560px; }
.star-pick { display: flex; gap: 2px; }
.star-pick button {
  border: 0;
  background: transparent;
  color: #d9d0c4;
  font-size: 30px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.star-pick button.on { color: #e0a106; }
.price { color: var(--price); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; margin: 6px 0 10px; }
.price s { color: #8a8178; font-weight: 500; font-size: 13px; margin-left: 6px; }
.btn {
  border: 0;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 8px 12px; font-size: 14px; }
.btn.danger { background: white; color: var(--bad); border: 1px solid #fecdd3; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.buy { width: 100%; margin-top: auto; }
.hero .btn.ghost { background: transparent; color: white; border-color: rgba(255, 255, 255, 0.28); }
.more { display: flex; justify-content: center; margin-top: 16px; }
.empty {
  text-align: center;
  padding: 42px 16px;
  background: white;
  border-radius: 24px;
  border: 1px dashed #ddd4c8;
}
.empty h1, .empty h2 { margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

.crumb { color: var(--muted); font-size: 14px; margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a { color: inherit; }
.product { display: grid; gap: 28px; }
.product .ph { border-radius: 24px; background: white; border: 1px solid var(--line); }
.product h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.04em; line-height: 1.05; margin: 6px 0; }
.desc { white-space: pre-wrap; line-height: 1.6; color: #3d362f; margin: 12px 0; }
.stock.ok { color: var(--good); font-weight: 700; }
.stock.low { color: var(--warn); font-weight: 700; }
.stock.no { color: var(--bad); font-weight: 700; }
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: white;
}
.stepper button, .stepper input, .stepper span {
  width: 42px;
  height: 44px;
  border: 0;
  background: white;
  text-align: center;
  display: grid;
  place-items: center;
}
.stepper input { width: 52px; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { appearance: none; margin: 0; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }

.layout { display: grid; gap: 18px; }
.box, .panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}
.line, .sum-line, .totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.line {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.line img, .prow img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3efe7;
}
.line-top { display: flex; justify-content: space-between; gap: 8px; }
.line h3 { font-size: 15px; }
.linkish { background: none; border: 0; color: var(--bad); padding: 0; }
.totals { display: grid; gap: 8px; margin-top: 12px; }
.totals .grand { font-size: 18px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 8px; }
.textlink { display: block; text-align: center; margin-top: 8px; color: var(--muted); }
.checkout { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 12px; }
.split { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.field .opt, .field span.opt { font-weight: 500; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; font-weight: 500; }
.field textarea { min-height: 120px; resize: vertical; }
.field.check { display: flex; align-items: center; grid-template-columns: auto 1fr; }
.field.check input { width: auto; }
.pay { display: grid; gap: 8px; }
.pay label {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  font-weight: 600;
}
.pay label:has(input:checked) { border-color: var(--accent); background: #fff6f2; }
.pay small { display: block; color: var(--muted); font-weight: 500; }
.error {
  background: #fff1f2;
  color: #9f1239;
  border-radius: 12px;
  padding: 10px 12px;
}
.success { max-width: 680px; margin: 0 auto; text-align: center; }
.success .box { text-align: left; margin: 18px 0; }
.check {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--good);
  color: white;
  font-size: 34px;
}
.sum-line { padding: 7px 0; }
.sum-line span { color: #3f382f; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: #5e564e; }
.foot { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: end; }
.foot a { color: #9a3412; font-weight: 700; }

#overlay { position: fixed; inset: 0; background: rgba(20, 16, 12, 0.48); z-index: 40; }
#drawer {
  position: fixed;
  z-index: 41;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: white;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.12);
}
#drawerBody { display: flex; flex-direction: column; height: 100%; }
.drawer-head, .drawer-foot { padding: 16px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.drawer-items { flex: 1; overflow: auto; padding: 0 16px; }
.drawer-foot { border-top: 1px solid var(--line); }
.drawer-foot .btn { width: 100%; margin-top: 10px; }
body.lock { overflow: hidden; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: white;
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 70;
  max-width: calc(100% - 24px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.admin { background: #efeae3; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); display: grid; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.login-card h1 { font-size: 32px; letter-spacing: -0.04em; }
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: #1c1714; color: #f6f0e8; padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; }
.online { display: flex; align-items: center; gap: 8px; margin: 0 8px; color: #b7aea4; font-size: 13px; font-weight: 700; }
.online::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #34d399; flex: none; }
.logo.light { color: white; padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button, .nav a {
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
}
.nav button.active, .nav button:hover, .nav a:hover { background: rgba(255, 255, 255, 0.08); }
.nav button.active { background: var(--accent); }
.content { padding: 22px; max-width: 1100px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 14px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.stat b { display: block; font-size: 24px; margin-top: 4px; letter-spacing: -0.03em; }
.banner, .warn {
  width: 100%;
  text-align: left;
  background: #fff6f2;
  color: #9a3412;
  border: 1px solid #ffd7c8;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  margin-bottom: 12px;
}
.banner { cursor: pointer; }
.warn button { margin-left: 8px; }
.prow {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.prow:last-child { border-bottom: 0; }
.prow h3 { font-size: 16px; }
.tag {
  display: inline-block;
  margin-left: 6px;
  background: #f3efe7;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}
.editor { display: grid; gap: 16px; align-items: start; }
.narrow { max-width: 720px; }
.drop {
  border: 1.5px dashed #c9bfb2;
  border-radius: 20px;
  min-height: 280px;
  display: grid;
  place-items: center;
  background: #faf7f2;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  padding: 16px;
}
.drop strong, .drop span { display: block; }
.drop span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.drop.over { border-color: var(--accent); background: #fff1ea; }
.drop img { width: 100%; height: 320px; object-fit: cover; }
.gallery-editor { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-editor .shot {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #efe8de;
}
.gallery-editor img { width: 100%; height: 100%; object-fit: cover; }
.gallery-editor .shot span {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(28, 23, 20, 0.78);
  color: white;
  font-size: 11px;
  font-weight: 800;
}
.gallery-editor .shot button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(28, 23, 20, 0.82);
  color: white;
  cursor: pointer;
  line-height: 1;
}
.order {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.order header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.order select { border-radius: 999px; }
.accounts-next { margin-top: 28px; }
.steps { margin: 4px 0 0; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; font-size: 14px; }

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media (min-width: 860px) {
  .account { grid-template-columns: 220px 1fr; }
  .product { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
  .layout, .checkout { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
  .summary { position: sticky; top: 92px; }
  .editor { grid-template-columns: 1fr 300px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 6; flex-direction: row; align-items: center; overflow: auto; }
  .nav { flex-direction: row; }
  .nav a, .nav button { white-space: nowrap; }
  .stats { grid-template-columns: 1fr; }
  .prow { grid-template-columns: 64px 1fr; }
  .row-actions { grid-column: 2; }
}
@media (max-width: 720px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "logo cart"
      "search search";
  }
  .logo { grid-area: logo; }
  .search-cluster { grid-area: search; }
  .price-toggle { max-width: 96px; }
  .header-actions { grid-area: cart; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
