:root {
  --bg: #17131a;
  --bg2: #0c0a0b;
  --text: #ece6e8;
  --hint: #9c9497;
  --accent: #b3122e;
  --accent-text: #ffffff;
  --danger: #ff5c72;
  --silver: linear-gradient(135deg, #f2eef0, #9c9497 50%, #e2dcdf);
  --radius: 14px;
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg2); color: var(--text); min-height: 100%;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
main { padding: 12px 12px 90px; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 20px; margin: 4px 0 12px; }
.topbar { padding: 14px 16px 4px; }
.hidden { display: none !important; }
.muted { color: var(--hint); }
.small { font-size: 13px; }
.center { text-align: center; }
.accent { color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--bg); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--bg2); cursor: pointer; }
.card .body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .title { font-size: 14px; font-weight: 500; cursor: pointer; flex: 1; }
.card.out img { opacity: .45; }

.price { font-weight: 700; }
.price.big { font-size: 22px; margin: 4px 0; }

.btn { border: 0; border-radius: 10px; padding: 9px 12px; width: 100%; font: inherit; font-weight: 600;
  background: var(--accent); color: var(--accent-text); cursor: pointer; }
.btn:disabled { background: var(--bg2); color: var(--hint); cursor: default; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--bg2);
  border-radius: 10px; overflow: hidden; }
.stepper button { border: 0; background: var(--accent); color: var(--accent-text); width: 38px; height: 36px;
  font-size: 20px; cursor: pointer; }
.stepper span { font-weight: 600; }

.view#view-product { background: var(--bg); border-radius: var(--radius); overflow: hidden; }
.p-image { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.p-body { padding: 14px 16px 18px; }
.p-body h2 { margin: 0; }

.cart-item { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: var(--radius);
  padding: 8px; margin-bottom: 8px; }
.cart-item img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item .stepper { width: 110px; }
.cart-item .warn { color: var(--danger); font-size: 12px; }

.total-row { display: flex; justify-content: space-between; align-items: center; background: var(--bg);
  border-radius: var(--radius); padding: 14px 16px; margin: 10px 0; font-size: 17px; }

form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--hint); }
input, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1.5px solid transparent;
  border-radius: 10px; padding: 11px 12px; outline: none; resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); }
.invalid { border-color: var(--danger) !important; }

#view-done { text-align: center; padding-top: 20px; }
.done-icon { font-size: 54px; }
.pay-box { background: var(--bg); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.card-number { font-size: 22px; font-weight: 700; letter-spacing: 1px; margin: 6px 0; cursor: pointer;
  font-variant-numeric: tabular-nums; }

.main-btn { position: fixed; left: 12px; right: 12px; bottom: 12px; padding: 15px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700; font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: rgba(0,0,0,.8);
  color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 90%; text-align: center; }

#p-desc { white-space: pre-line; }

/* ===== Red Room ===== */
body { background:
  radial-gradient(120% 60% at 50% -10%, rgba(179,18,46,.35), transparent 60%),
  radial-gradient(80% 50% at 100% 100%, rgba(179,18,46,.12), transparent 70%),
  #0c0a0b; background-attachment: fixed; }
.topbar { padding: 18px 16px 10px; text-align: center; }
.topbar .logo { height: 54px; max-width: 100%; display: block; margin: 0 auto; }
.topbar h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.topbar .tagline { margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--hint); }
.topbar::after { content: ""; display: block; height: 1px; margin: 14px auto 0; width: 70%;
  background: linear-gradient(90deg, transparent, #b3122e, transparent); }
h2, .p-body h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: .3px; }
.card { background: linear-gradient(180deg, #1c171e, #141015); border: 1px solid rgba(226,220,223,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.45); transition: transform .15s, box-shadow .15s; }
.card:active { transform: scale(.98); }
.card .title { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.2; }
.price { color: #fff; }
.card .price, .price.big { color: #f2c2cb; }
.btn, .stepper button, .main-btn { background: linear-gradient(135deg, #d01a3a, #8a0b22);
  box-shadow: 0 4px 14px rgba(179,18,46,.35); letter-spacing: .3px; }
.btn:disabled { background: #241e26; box-shadow: none; }
.stepper { background: #241e26; }
.view#view-product { background: linear-gradient(180deg, #1c171e, #141015); border: 1px solid rgba(226,220,223,.08); }
.cart-item, .total-row, .pay-box { background: #17131a; border: 1px solid rgba(226,220,223,.08); }
input, textarea { background: #17131a; border-color: rgba(226,220,223,.12); }
input::placeholder, textarea::placeholder { color: #6d6669; }
.card-number { color: #fff; }
.toast { background: rgba(23,19,26,.95); border: 1px solid rgba(179,18,46,.5); }

/* Подтверждение возраста */
.age-gate { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: radial-gradient(90% 60% at 50% 30%, rgba(179,18,46,.35), transparent 70%), rgba(8,6,7,.97);
  backdrop-filter: blur(6px); text-align: center; }
.age-gate .box { max-width: 340px; }
.age-gate img { width: 180px; height: 180px; border-radius: 50%; box-shadow: 0 0 40px rgba(179,18,46,.4); }
.age-gate h2 { margin: 18px 0 6px; font-size: 28px; }
.age-gate p { color: var(--hint); margin: 0 0 22px; }
.age-gate .btn { padding: 14px; font-size: 16px; margin-bottom: 10px; }
.age-gate .btn.ghost { background: transparent; box-shadow: none; border: 1px solid rgba(226,220,223,.2); color: var(--hint); }
.card img, .p-image { aspect-ratio: 3 / 4; object-position: center top; }
