:root {
  --bg: #0B0B0B;
  --card: #1A1A1A;
  --card2: #222222;
  --ph: #2A2A2A;
  --line: #333333;
  --text: #FFFFFF;
  --body: #CFCFCF;
  --mut: #A3A3A3;
  --dim: #5C5C5C;
  --red: #C62828;
  --redtxt: #FF6B6B;
  --ok: #4CAF50;
  --display: 'Unbounded', system-ui, sans-serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); }
body { min-height: 100vh; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img, video { display: block; }
[hidden] { display: none !important; }

.app { position: relative; min-height: 100vh; background: var(--bg) url(/img/bg.jpg) center top / cover fixed no-repeat; }
.view { max-width: 560px; margin: 0 auto; padding: 16px 16px 120px; display: flex; flex-direction: column; gap: 14px; }
.loading { padding: 80px 0; text-align: center; color: var(--mut); }

h1 { margin: 8px 0 0; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.15; }
h2 { margin: 8px 0 0; font-family: var(--display); font-weight: 700; font-size: 17px; }
.muted { color: var(--mut); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; }
.pre { white-space: pre-line; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: none; background: var(--text); color: var(--bg); font-weight: 700; font-size: 15px; text-decoration: none; }
.btn.block { width: 100%; min-height: 54px; font-size: 16px; }
.btn.dark { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: .5; }
.link-btn { background: none; border: none; color: var(--text); text-decoration: underline; font-weight: 600; min-height: 44px; padding: 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: none; background: var(--card); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Главная */
.logo { display: flex; justify-content: center; padding-top: 4px; position: relative; }
.logo img { width: 170px; height: auto; }
.admin-entry { position: absolute; right: 0; top: 4px; }
.hero { position: relative; margin-top: 8px; }
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 22px; min-height: 204px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.hero-text { width: 54%; display: flex; flex-direction: column; gap: 8px; }
.hero-title { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.2; }
.hero-sub { font-size: 13px; line-height: 1.4; color: var(--mut); }
.hero-video { position: absolute; right: 20px; top: 10px; width: 128px; height: 186px; object-fit: cover; border-radius: 22px; border: 3px solid var(--bg); transform: rotate(5deg); box-shadow: 0 16px 34px rgba(0,0,0,.6); background: var(--ph); }

.tile { position: relative; overflow: hidden; height: 150px; padding: 18px; border-radius: 24px; border: none; background: var(--card); color: var(--text); text-align: left; display: flex; flex-direction: column; justify-content: flex-start; }
.tile-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; }
.tile-title { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.2; }
.tile-sub { font-size: 12px; font-weight: 500; color: var(--mut); }
.tile img { position: absolute; display: block; }
.tile .t-jackets { left: 8px; right: 8px; bottom: 10px; width: calc(100% - 16px); height: auto; }
.tile .t-bag { right: 10px; bottom: -8px; width: 80px; height: auto; transform: rotate(-7deg); filter: drop-shadow(0 10px 14px rgba(30,0,0,.65)); }
.tile .t-hand { right: 16px; bottom: 18px; width: 60px; height: auto; opacity: .95; }
.tile .t-route { right: 18px; bottom: 16px; width: 50px; height: auto; opacity: .95; }
.sale-bg { background: linear-gradient(155deg, rgba(70,0,6,.78) 0%, rgba(70,0,6,.35) 45%, rgba(70,0,6,0) 75%), #8B0A14 url(/img/sale.jpg) center / cover no-repeat; border: 1px solid #5A0E12; }
.sale-bg .tile-title, .sale-bg .tile-sub { color: #fff; text-shadow: 0 2px 10px rgba(40,0,0,.6); }
.sale-bg .tile-sub { font-weight: 600; }

.wide-tile { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 24px; border: none; text-align: left; width: 100%; }
.wide-tile.light { background: var(--text); color: var(--bg); }
.wide-tile.dark { background: var(--card); color: var(--text); }
.wide-tile .wt-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.wide-tile .wt-title { font-family: var(--display); font-weight: 700; font-size: 16px; }
.wide-tile .wt-sub { font-size: 12px; font-weight: 500; opacity: .7; }

/* Товары */
.pcard { background: var(--card); border: none; border-radius: 22px; padding: 0; overflow: hidden; text-align: left; color: var(--text); display: flex; flex-direction: column; }
.pcard .thumb { position: relative; aspect-ratio: 3 / 4; background: var(--ph); }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--bg); color: #fff; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 700; }
.badge.red { background: var(--red); }
.badge.right { left: auto; right: 10px; }
.pcard .info { padding: 12px; display: flex; flex-direction: column; gap: 5px; }
.p-type { font-size: 11px; color: var(--mut); font-weight: 500; }
.p-name { font-size: 14px; font-weight: 700; line-height: 1.25; }
.p-sizes { font-size: 12px; color: var(--mut); }
.price { font-size: 15px; font-weight: 700; }
.price .old { font-size: 12px; color: var(--mut); text-decoration: line-through; font-weight: 500; margin-left: 6px; }
.price.sale { color: var(--redtxt); }
.empty { background: var(--card); border-radius: 22px; padding: 28px 20px; text-align: center; color: var(--mut); font-size: 14px; display: flex; flex-direction: column; gap: 12px; align-items: center; }

.search { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 999px; padding: 0 16px; height: 50px; }
.search input { border: none; outline: none; background: transparent; flex: 1; font-size: 15px; min-width: 0; }
.chips-label { font-size: 12px; font-weight: 700; color: var(--mut); letter-spacing: .06em; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex-shrink: 0; height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap; background: var(--card); color: var(--text); border: 1px solid var(--line); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.sale-banner { position: relative; overflow: hidden; border-radius: 26px; padding: 22px; min-height: 150px; }
.sale-banner .sb-text { position: relative; z-index: 1; width: 62%; display: flex; flex-direction: column; gap: 8px; }
.sale-banner .sb-title { font-family: var(--display); font-weight: 700; font-size: 22px; text-shadow: 0 2px 10px rgba(40,0,0,.6); }
.sale-banner .sb-sub { font-size: 13px; font-weight: 600; line-height: 1.4; text-shadow: 0 1px 6px rgba(40,0,0,.7); }
.sale-banner img { position: absolute; right: 16px; bottom: -14px; width: 104px; transform: rotate(-7deg); filter: drop-shadow(0 12px 16px rgba(30,0,0,.65)); }

/* Карточка товара */
.gallery { position: relative; margin: -16px -16px 0; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--ph); }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 3 / 4; max-height: 70vh; display: flex; align-items: center; justify-content: center; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; }
.dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.45); transition: width .2s; }
.dots span.on { width: 18px; background: #fff; }
.gallery .back { position: absolute; top: 16px; left: 16px; background: rgba(11,11,11,.75); }
.counter { position: absolute; top: 24px; right: 16px; background: rgba(11,11,11,.75); border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.p-head { display: flex; flex-direction: column; gap: 6px; }
.p-brand { font-size: 12px; font-weight: 600; color: var(--mut); letter-spacing: .04em; }
.p-title { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.2; }
.p-price { font-size: 20px; font-weight: 700; }
.warn { color: var(--redtxt); font-size: 13px; font-weight: 600; }

/* Корзина */
.cart-item { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 20px; padding: 12px; }
.cart-item .ci-img { width: 64px; height: 80px; border-radius: 12px; background: var(--ph); object-fit: cover; flex-shrink: 0; }
.cart-item .ci-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; text-align: left; background: var(--card); border: 2px solid var(--card); width: 100%; }
.opt.on { border-color: var(--text); }
.opt .dot { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--dim); flex-shrink: 0; }
.opt.on .dot { border: 6px solid var(--text); }
.opt .o-title { font-weight: 700; font-size: 15px; }
.opt .o-sub { font-size: 12px; color: var(--mut); margin-top: 3px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--body); }
.field input, .field textarea, .field select { background: transparent; border: 1px solid var(--line); border-radius: 14px; min-height: 46px; padding: 10px 12px; font-size: 15px; color: var(--text); outline: none; width: 100%; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.field select option { background: var(--card); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--mut); }
.req { background: var(--text); color: var(--bg); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.req .r-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 500; }
.req .r-line span:first-child { color: #555; }
.req .r-line span:last-child { text-align: right; word-break: break-word; }
.req hr { border: none; height: 1px; background: #ddd; margin: 2px 0; width: 100%; }
.req .r-total { font-weight: 700; font-size: 16px; }
.copy { background: none; border: none; padding: 0 0 0 6px; color: inherit; text-decoration: underline; font-size: 12px; font-weight: 700; }
.bubble { align-self: flex-start; max-width: 92%; background: var(--card2); border-radius: 18px 18px 18px 6px; padding: 12px 14px; font-size: 13px; line-height: 1.5; white-space: pre-line; }
.bubble.me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--ph); }
.done-mark { align-self: center; width: 72px; height: 72px; border-radius: 999px; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; }

/* Отзывы */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: var(--card); border-radius: 999px; padding: 5px; }
.seg button { height: 42px; border: none; border-radius: 999px; font-weight: 700; font-size: 14px; background: transparent; color: var(--text); }
.seg button.on { background: var(--text); color: var(--bg); }
.review { background: var(--card); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--ph); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--mut); flex-shrink: 0; }
.stars { color: #fff; font-weight: 700; font-size: 13px; letter-spacing: 1px; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--ph); }
.ext-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; text-decoration: none; min-height: 32px; }
.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; flex-direction: column; justify-content: flex-end; z-index: 50; }
.sheet { background: var(--card); border-radius: 28px 28px 0 0; padding: 22px 16px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-width: 560px; width: 100%; margin: 0 auto; max-height: 92vh; overflow-y: auto; }
.star-btn { width: 44px; height: 44px; border: none; background: transparent; padding: 0; }

/* О нас */
.timeline { display: flex; flex-direction: column; gap: 16px; }
.tl-item { display: flex; gap: 14px; }
.tl-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--text); margin-top: 4px; flex-shrink: 0; }
.contact { background: var(--card); border-radius: 18px; padding: 0 18px; min-height: 54px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; text-decoration: none; }
.rules-block .rb-title { font-weight: 700; font-size: 15px; }
.rules-block ul { margin: 0; padding-left: 18px; color: var(--body); font-size: 14px; line-height: 1.55; display: flex; flex-direction: column; gap: 4px; }

/* Нижнее меню и корзина */
.nav { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 536px; margin: 0 auto; background: var(--card); border-radius: 28px; padding: 6px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 20; }
.nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; min-height: 52px; border: none; border-radius: 22px; font-weight: 600; font-size: 11px; background: transparent; color: var(--mut); }
.nav button.on { background: var(--ph); color: var(--text); }
.cart-fab { position: fixed; right: max(16px, calc(50% - 264px)); bottom: calc(96px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 999px; border: none; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.45); z-index: 21; }
.cart-count { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); padding: 0 4px; }
.toast { visibility: hidden; opacity: 0; position: fixed; left: 50%; top: 20px; transform: translate(-50%, -150%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; transition: transform .25s, opacity .25s, visibility .25s; z-index: 100; max-width: 90vw; text-align: center; }
.toast.show { transform: translate(-50%, 0); visibility: visible; opacity: 1; }
.toast.err { background: var(--red); color: #fff; }

/* Админ-панель */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex-shrink: 0; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 700; font-size: 13px; }
.tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.a-item { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 18px; padding: 10px; text-align: left; border: none; width: 100%; color: var(--text); }
.a-item img, .a-item .noimg { width: 52px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--ph); flex-shrink: 0; }
.a-item .ai-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.a-item .ai-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--ph); color: var(--body); }
.pill.red { background: var(--red); color: #fff; }
.pill.green { background: #1F4D22; color: #B7F0BA; }
.pill.white { background: #fff; color: #000; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.m-cell { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--ph); }
.m-cell img, .m-cell video { width: 100%; height: 100%; object-fit: cover; }
.m-cell .m-tools { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; justify-content: space-between; }
.m-cell .m-tools button { width: 30px; height: 30px; border-radius: 999px; border: none; background: rgba(11,11,11,.8); color: #fff; font-size: 14px; font-weight: 700; padding: 0; }
.m-cell .m-first { position: absolute; top: 4px; left: 4px; }
.m-add { aspect-ratio: 3 / 4; border-radius: 12px; border: 1px dashed var(--dim); background: transparent; color: var(--mut); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; position: relative; overflow: hidden; }
.m-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.progress { height: 6px; border-radius: 3px; background: var(--ph); overflow: hidden; }
.progress div { height: 100%; background: var(--text); width: 0; transition: width .2s; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 16px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.switch input { width: 46px; height: 28px; appearance: none; -webkit-appearance: none; background: var(--dim); border-radius: 999px; position: relative; flex-shrink: 0; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; transition: left .2s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { left: 21px; }
.section-title { font-size: 12px; font-weight: 700; color: var(--mut); letter-spacing: .06em; text-transform: uppercase; margin-top: 10px; }
.list-edit { display: flex; flex-direction: column; gap: 10px; }
.list-edit .le-item { background: var(--card); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.danger { color: var(--redtxt); }
