/* B-SIDE — тёмная тема с неоновым оранжевым, как на логотипе */
:root {
  --bg: #0b0b0c;
  --card: #151517;
  --card-2: #1d1d21;
  --text: #f6f4f2;
  --hint: #8e8a87;
  --line: rgba(255, 255, 255, .08);
  --accent: #ff5b1a;
  --accent-2: #ff8a3d;
  --accent-text: #120600;
  --soft: rgba(255, 91, 26, .13);
  --glow: 0 0 0 1px rgba(255, 110, 40, .35), 0 8px 28px -6px rgba(255, 91, 26, .55);
  --danger: #ff4d4d;
  --ok: #3ddc84;
  --warn: #ffb020;
  --info: #5aa9ff;
  --radius: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: calc(80px + var(--safe-b));
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 100% -10%, rgba(255, 91, 26, .14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent-2); }

/* заголовки в духе логотипа: жирный курсив капсом */
.display { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.02em; }

/* ---------- шапка и нижнее меню ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: rgba(11, 11, 12, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px rgba(255, 91, 26, .7), 0 0 14px rgba(255, 91, 26, .45); }
.brand-name { font-weight: 900; font-style: italic; font-size: 20px; letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-badge {
  flex: none; font-size: 12px; font-weight: 800; padding: 6px 10px; border-radius: 99px;
  background: var(--soft); color: var(--accent-2); border: 1px solid rgba(255, 91, 26, .35);
}

.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: flex; padding: 8px 6px calc(8px + var(--safe-b));
  background: rgba(16, 16, 18, .92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--hint); padding: 2px 0; transition: color .15s; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab .ti { position: relative; display: block; height: 24px; }
.tab.on { color: var(--accent); }
.tab.on svg { filter: drop-shadow(0 0 6px rgba(255, 91, 26, .7)); }
.dot {
  position: absolute; top: -5px; right: -11px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--accent-text);
  font: 800 11px/18px sans-serif; text-align: center; box-shadow: 0 0 10px rgba(255, 91, 26, .7);
}

main { padding: 14px 16px 16px; }
.loader { width: 30px; height: 30px; margin: 90px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- базовые элементы ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.hint { color: var(--hint); font-size: 13px; }
.h2 { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; font-size: 18px; margin: 22px 2px 12px; display: flex; align-items: center; gap: 8px; }
.h2::before { content: "✦"; color: var(--accent); font-style: normal; text-shadow: 0 0 10px rgba(255, 91, 26, .8); }
.empty { text-align: center; color: var(--hint); padding: 56px 16px; }
.empty .big { font-size: 46px; margin-bottom: 10px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: 14px; font-weight: 800; letter-spacing: .01em;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-text);
  transition: transform .1s, opacity .15s;
}
.btn.glow { box-shadow: var(--glow); }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: rgba(255, 77, 77, .12); color: var(--danger); }
.btn.sm { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 14px; }
.btn:disabled { opacity: .45; }
.btn:active { transform: scale(.97); }

input.in, textarea.in, select.in {
  width: 100%; border: 1px solid var(--line); background: var(--card-2); border-radius: 13px;
  padding: 12px 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.in { resize: vertical; min-height: 80px; }
.in:focus { border-color: rgba(255, 91, 26, .7); box-shadow: 0 0 0 3px rgba(255, 91, 26, .15); }
.in::placeholder { color: #6d6966; }
label.f { display: block; }
label.f > span { display: block; font-size: 12px; font-weight: 600; color: var(--hint); margin: 0 2px 6px; text-transform: uppercase; letter-spacing: .04em; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* переключатель «в наличии» */
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: #2b2b30; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #8e8a87; transition: transform .2s, background .2s; }
.switch.on { background: var(--accent); box-shadow: 0 0 12px rgba(255, 91, 26, .5); }
.switch.on::after { transform: translateX(18px); background: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 15px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: #cfcac6; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 16px -2px rgba(255, 91, 26, .6); }

.search { position: relative; margin: 14px 0 12px; }
.search input { padding-left: 42px; background: var(--card); }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--hint); stroke-width: 2; stroke-linecap: round; }

/* ---------- витрина: hero ---------- */
.hero { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 0 0 1px rgba(255, 91, 26, .25), 0 18px 40px -18px rgba(255, 91, 26, .55); }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .88)); }
.hero-txt { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.hero-txt .t { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 22px; line-height: 1.05; letter-spacing: -.02em; margin-top: 4px; }

/* ---------- бонусы ---------- */
.bonus {
  position: relative; overflow: hidden; margin-top: 12px;
  background: linear-gradient(135deg, #1e120c, #151517 60%);
  border: 1px solid rgba(255, 91, 26, .35); border-radius: var(--radius); padding: 14px 16px;
}
.bonus::after { content: "✦"; position: absolute; right: 14px; top: 6px; font-size: 44px; color: var(--accent); opacity: .9; text-shadow: 0 0 18px rgba(255, 91, 26, .9); }
.bonus .big { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 18px; padding-right: 48px; }
.bonus .big em { color: var(--accent); font-style: inherit; }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin-top: 12px; overflow: hidden; }
.bar > i { display: block; height: 100%; min-width: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; box-shadow: 0 0 10px rgba(255, 91, 26, .8); }
.bonus .sub { font-size: 13px; color: #c9c3be; margin-top: 8px; }

/* ---------- карточки товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
.pc { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: border-color .2s; }
.pc:active { border-color: rgba(255, 91, 26, .5); }
.pc.in-cart { border-color: rgba(255, 91, 26, .55); box-shadow: 0 0 18px -6px rgba(255, 91, 26, .6); }
.media {
  position: relative; aspect-ratio: 1; width: 100%; overflow: hidden;
  background: radial-gradient(circle at 50% 65%, rgba(255, 91, 26, .28), transparent 62%), #0f0f11;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media img.ph { opacity: .55; filter: saturate(.9); }
.tag { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 8px; background: rgba(0, 0, 0, .65); color: var(--accent-2); backdrop-filter: blur(6px); }
.pc .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc .name { font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 36px; }
.price { font-weight: 900; font-size: 16px; white-space: nowrap; }
.plus {
  flex: none; width: 36px; height: 36px; border-radius: 12px; font-size: 22px; font-weight: 700; line-height: 1;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-text); box-shadow: 0 0 14px -2px rgba(255, 91, 26, .7);
}
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--card-2); border: 1px solid rgba(255, 91, 26, .4); border-radius: 12px; height: 36px; }
.stepper button { width: 32px; height: 34px; font-size: 19px; font-weight: 800; color: var(--accent); }
.stepper b { min-width: 18px; text-align: center; font-weight: 800; }
.pc .stepper { flex: none; }

/* ---------- корзина и заказы ---------- */
.li { display: flex; gap: 12px; align-items: center; }
.li .thumb { width: 58px; height: 58px; border-radius: 14px; flex: none; overflow: hidden; background: radial-gradient(circle at 50% 65%, rgba(255, 91, 26, .3), transparent 65%), #0f0f11; }
.li .thumb img { width: 100%; height: 100%; object-fit: cover; }
.li .thumb img.ph { opacity: .55; }
.li + .li { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sum { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.sum.total { font-weight: 900; font-size: 20px; padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--line); }
.sum.total span:last-child { color: var(--accent); text-shadow: 0 0 14px rgba(255, 91, 26, .45); }
.sum.disc { color: var(--ok); }
.sticky-cta { position: sticky; bottom: calc(84px + var(--safe-b)); margin-top: 16px; z-index: 2; }

.badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.badge.new { background: rgba(255, 91, 26, .15); color: var(--accent-2); }
.badge.accepted { background: rgba(90, 169, 255, .14); color: var(--info); }
.badge.done { background: rgba(61, 220, 132, .14); color: var(--ok); }
.badge.cancelled { background: rgba(255, 255, 255, .07); color: var(--hint); }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 800; letter-spacing: .06em; }
.order + .order { margin-top: 10px; }
.order .items { font-size: 14px; margin: 10px 0; color: #dcd7d3; }
.comment { background: var(--card-2); border-radius: 11px; padding: 9px 11px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }

/* ---------- админка ---------- */
.seg { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; padding: 9px 13px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--hint); }
.seg button.on { color: var(--accent-2); border-color: rgba(255, 91, 26, .5); background: var(--soft); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile .v { font-size: 20px; font-weight: 900; margin-top: 4px; }
.status-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tier { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; align-items: end; }
.tier + .tier { margin-top: 8px; }
.x { height: 46px; border-radius: 13px; background: rgba(255, 77, 77, .12); color: var(--danger); font-size: 18px; }
.img-pick { display: flex; gap: 12px; align-items: center; }
.img-pick .thumb { width: 88px; height: 88px; border-radius: 14px; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--card-2); }
.img-pick .thumb img { width: 100%; height: 100%; object-fit: cover; }
.prow { cursor: pointer; }
.prow.off .thumb, .prow.off .pname { opacity: .4; }
.stock-out { color: var(--danger); }

/* ---------- 18+ ---------- */
.gate { position: fixed; inset: 0; z-index: 50; background: radial-gradient(90% 60% at 50% 0%, rgba(255, 91, 26, .22), transparent 60%), #070707; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.gate-in { width: 100%; max-width: 380px; text-align: center; }
.gate-logo { width: 190px; height: 190px; object-fit: cover; border-radius: 50%; margin: 0 auto; box-shadow: 0 0 0 2px rgba(255, 91, 26, .6), 0 0 60px -6px rgba(255, 91, 26, .7); }
.gate-badge { display: inline-block; margin-top: 22px; font-weight: 900; font-style: italic; font-size: 22px; padding: 4px 14px; border-radius: 12px; border: 2px solid var(--accent); color: var(--accent); text-shadow: 0 0 12px rgba(255, 91, 26, .7); }
.gate h2 { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 22px; margin: 14px 0 8px; letter-spacing: -.01em; }
.gate p { color: var(--hint); margin: 0 0 22px; }
.gate .btn + .btn { margin-top: 10px; }

/* ---------- sheet / toast ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 92vh; overflow-y: auto;
  background: #121214; border-top: 1px solid rgba(255, 91, 26, .3); border-radius: 24px 24px 0 0;
  padding: 8px 16px calc(18px + var(--safe-b)); animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .18); margin: 0 auto 12px; }
.sheet .media { border-radius: 18px; margin-bottom: 14px; }
.sheet h3 { margin: 0 0 6px; font-size: 22px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; }
.sheet .price { font-size: 22px; color: var(--accent); text-shadow: 0 0 14px rgba(255, 91, 26, .4); }
.desc { white-space: pre-wrap; word-break: break-word; margin: 12px 0 18px; color: #d6d1cd; }
.sheet .stepper { height: 50px; border-radius: 14px; }
.sheet .stepper button { width: 50px; height: 48px; font-size: 22px; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(90px + var(--safe-b)); z-index: 60;
  background: rgba(30, 30, 34, .96); border: 1px solid var(--line); color: #fff; padding: 13px 15px; border-radius: 14px; font-size: 14px; font-weight: 600;
  animation: fade .2s; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.toast.err { border-color: rgba(255, 77, 77, .5); color: #ffb3b3; }

.success { text-align: center; padding: 36px 12px; }
.success .star { font-size: 64px; color: var(--accent); text-shadow: 0 0 30px rgba(255, 91, 26, .9); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.success h2 { font-weight: 900; font-style: italic; text-transform: uppercase; margin: 6px 0 0; }
.success .code { font-size: 30px; margin: 10px 0; display: block; color: var(--accent-2); }
@keyframes pop { from { transform: scale(.3) rotate(-40deg); opacity: 0; } }

@media (min-width: 640px) {
  main, .top { max-width: 780px; margin-left: auto; margin-right: auto; }
  .sheet { max-width: 560px; margin: 0 auto; }
}

/* ---------- чат сообщества ---------- */
.community {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
.community:active { border-color: rgba(255, 91, 26, .5); }
.community-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--soft); }
.community b { display: block; font-size: 15px; }
.community .hint { display: block; margin-top: 1px; }
.community-go { flex: none; font-size: 13px; font-weight: 800; color: var(--accent-2); padding: 7px 11px; border-radius: 10px; border: 1px solid rgba(255, 91, 26, .45); }
