/* Каталог ТОП КРОСС. Светлая тема в стиле DropOpt, одна колонка как в мини-приложении. */
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/fonts/unbounded-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url(/fonts/unbounded-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #f3f3f0;
  --card: #ffffff;
  --ink: #111111;
  --muted: #74746f;
  --line: #dcdcd6;
  --chip: #ecece8;
  --sale: #d8442b;
  --season: #f5d63d;
  --notify-bg: #fbf0c4;
  --notify-line: #f2d873;
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [data-open]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 520px; margin: 0 auto; padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
.pad { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* шапка */
.top { display: flex; align-items: center; gap: 8px; padding-block: 16px 12px; }
.logo { font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; margin-right: auto; line-height: 1.05; }
.pill { border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 600; color: #555; font-size: 13px; white-space: nowrap; }
.count { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #555; font-weight: 600; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #23a447; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; position: relative; flex: none; }
.badge-num { position: absolute; top: -4px; right: -4px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

.search-row { display: flex; gap: 8px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--chip); border: 1.5px solid var(--line); border-radius: 18px; padding: 0 14px; height: 54px; }
.search input { border: 0; background: none; outline: none; font: inherit; font-size: 16px; width: 100%; min-width: 0; color: var(--ink); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.filters-btn { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 18px; padding: 6px 14px 6px 6px; box-shadow: 0 2px 10px rgba(0,0,0,.08); text-align: left; flex: none; }
.filters-btn .sq { width: 42px; height: 42px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; }
.filters-btn b { display: block; font-family: var(--f-display); font-size: 14px; }
.filters-btn small { color: var(--muted); font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.chip { border: 1.5px solid var(--line); background: var(--chip); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.sale { color: var(--sale); border-color: var(--sale); background: transparent; }
.chip.sale.on { background: var(--sale); color: #fff; }
select.chip { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23777' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; font-family: inherit; }

.brands { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px 4px; }
.brands::-webkit-scrollbar { display: none; }
.brand { flex: none; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 18px; font-family: var(--f-display); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.brand small { color: var(--muted); font-family: var(--f-body); margin-left: 6px; font-weight: 600; }
.brand.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.updated { color: var(--muted); font-size: 13px; margin: 12px 0 10px; }

/* карточки */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }
.card { text-align: left; min-width: 0; cursor: pointer; }
.ph { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #d9d9d5; max-width: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag { position: absolute; left: 10px; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; color: #111; }
.tag.season { background: var(--season); bottom: 10px; }
.gwrap { position: absolute; right: 10px; bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.gwrap span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #111; font-size: 13px; font-weight: 800; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.gwrap span.em { font-size: 16px; }
.gwrap span.sm { font-size: 10px; letter-spacing: -.02em; }
.heart { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; }
.heart.on svg path { fill: var(--sale); stroke: var(--sale); }
.card .b { margin-top: 10px; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: #666; text-transform: uppercase; }
.card .n { font-size: 15px; font-weight: 700; margin-top: 3px; line-height: 1.3; overflow-wrap: anywhere; }
.card .p { font-family: var(--f-display); font-weight: 700; font-size: 16px; margin-top: 4px; }
.card .p s { color: var(--muted); font-size: 12px; font-weight: 600; margin-left: 6px; }
.card.soldout .ph img { opacity: .55; }
.soldout-tag { position: absolute; top: 10px; left: 10px; background: rgba(17,17,17,.82); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.empty, .loading { color: var(--muted); text-align: center; padding: 40px 0; line-height: 1.5; }
.loading { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* нижнее меню */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); z-index: 20; }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: #888; }
.tabbar button.on { color: var(--ink); }

/* страница товара */
.back { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; display: flex; justify-content: space-between; padding-block: 10px; pointer-events: none; }
.back > * { pointer-events: auto; }
.round-btn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 1px 6px rgba(0,0,0,.12); display: grid; place-items: center; position: relative; }
.in-app .back-btn { visibility: hidden; }
.in-app .back-inline { display: none; }
.back-inline { padding-top: 12px; }
.gallery { position: relative; margin-top: -62px; background: #d9d9d5; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 1; max-width: 100%; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.gal-dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 30px; display: flex; gap: 5px; background: rgba(0,0,0,.3); padding: 6px 9px; border-radius: 999px; }
.gal-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.75); transition: width .2s; }
.gal-dots i.on { width: 18px; background: #fff; }
.gal-count { position: absolute; right: 12px; bottom: 26px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.sheet-body { background: var(--card); border-radius: 22px 22px 0 0; margin-top: -18px; position: relative; padding-block: 22px 200px; }
.pd-brand { font-size: 12px; font-weight: 700; letter-spacing: .18em; color: #666; text-transform: uppercase; }
.pd-name { font-family: var(--f-display); font-size: 24px; line-height: 1.15; margin: 6px 0 10px; text-wrap: balance; overflow-wrap: anywhere; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-tag { display: inline-flex; gap: 6px; align-items: center; font-weight: 800; letter-spacing: .08em; font-size: 12px; padding: 6px 14px; border-radius: 999px; background: var(--chip); color: #111; }
.pd-tag.season { background: var(--season); }
.pd-price { font-family: var(--f-display); font-size: 32px; font-weight: 800; margin: 14px 0 20px; font-variant-numeric: tabular-nums; }
.pd-price s { font-size: 16px; color: var(--muted); margin-left: 8px; font-weight: 600; }
.pd-info { margin: -6px 0 22px; color: #4a4a46; font-size: 14px; font-weight: 400; line-height: 1.5; }
.pd-info p { margin: 0 0 3px; }
.label { font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 12px; }
.sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.size { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 0; text-align: center; background: var(--card); min-width: 0; }
.size b { display: block; font-family: var(--f-display); font-size: 18px; }
.size small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.size.out { border-style: dashed; }
.size.out b { color: #aaa; text-decoration: line-through; }
.size.out small { color: #aaa; }
.size.on { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.size.on small { color: #ccc; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 12px; line-height: 1.4; }
.insole { display: flex; gap: 10px; align-items: center; background: var(--chip); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; font-weight: 600; margin-bottom: 10px; }
.insole span { background: var(--ink); color: #fff; border-radius: 10px; padding: 3px 9px; font-weight: 700; font-size: 13px; }
details.acc { background: var(--chip); border: 1.5px solid var(--line); border-radius: 16px; margin-bottom: 10px; }
details.acc summary { list-style: none; padding: 14px 16px; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; cursor: pointer; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; color: #777; font-size: 20px; line-height: 1; }
details.acc[open] summary::after { content: "−"; }
details.acc .in { padding: 0 16px 14px; color: #444; font-size: 14px; line-height: 1.5; white-space: pre-line; }
table.st { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; white-space: normal; }
table.st td, table.st th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.code { color: var(--muted); font-size: 14px; margin: 6px 0 12px; }
.desc { font-size: 14px; line-height: 1.5; color: #333; margin: 0 0 12px; white-space: pre-line; }
.wide { display: block; width: 100%; border-radius: 16px; padding: 15px; font-weight: 700; font-size: 16px; margin-bottom: 10px; text-align: center; }
.wide.outline { border: 1.5px solid var(--line); background: var(--card); }
.wide.notify { background: var(--notify-bg); border: 1.5px solid var(--notify-line); color: #9a5a00; }
.wide.grey { background: var(--chip); border: 1.5px solid var(--line); }
.wide.black { background: var(--ink); color: #fff; }
.wide:disabled { opacity: .6; cursor: default; }
a.wide { text-decoration: none; color: var(--ink); }
a.wide.black { color: #fff; }
.h-sec { font-size: 13px; font-weight: 800; letter-spacing: .16em; color: #666; text-transform: uppercase; margin: 22px 0 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row3 .p { font-size: 15px; }
.row3 .n { font-size: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); z-index: 25; padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.actionbar .inner { max-width: 520px; margin: 0 auto; }
.ab-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin-bottom: 10px; }
.btn-black { background: var(--ink); color: #fff; border-radius: 18px; padding: 16px 10px; font-weight: 700; font-size: 17px; display: flex; justify-content: center; gap: 8px; align-items: center; min-width: 0; }
.btn-black span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-white { background: var(--card); border: 2px solid var(--ink); border-radius: 18px; padding: 14px 10px; font-weight: 700; font-size: 17px; }

/* корзина */
.cg { border: 1.5px solid var(--line); background: var(--card); border-radius: 18px; padding: 12px; margin-bottom: 12px; }
.cg-head { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.cg-head img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: #d9d9d5; }
.cl { display: flex; align-items: center; gap: 10px; padding: 10px 0 0; margin-top: 10px; border-top: 1px solid var(--line); }
.cl > span { flex: 1; min-width: 0; font-size: 14px; }
.cl.bad > span { color: var(--sale); }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--chip); border-radius: 12px; padding: 3px; }
.stepper button { width: 30px; height: 30px; border-radius: 9px; background: var(--card); font-weight: 800; font-size: 17px; }
.stepper b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.add-size { margin-top: 10px; width: 100%; border: 1.5px dashed var(--line); border-radius: 12px; padding: 10px; font-weight: 700; color: #555; }
.grow { flex: 1; min-width: 0; }
.x { color: var(--muted); padding: 8px; }

/* всплывающие окна */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 520px; max-height: 92%; overflow-y: auto; overscroll-behavior: contain; border-radius: 24px 24px 0 0; padding-block: 10px calc(24px + env(safe-area-inset-bottom, 0px)); animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); } }
@media (prefers-reduced-motion: reduce) { .sheet, .loading { animation: none; } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #d5d5d0; margin: 0 auto 14px; }
.sheet h2 { font-family: var(--f-display); font-size: 22px; margin: 0 0 14px; }
.sheet .text { white-space: pre-line; line-height: 1.5; color: #333; margin: 0 0 16px; }
.oi { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.oi img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: #d9d9d5; }
.oi .t { font-weight: 700; font-size: 16px; }
.oi .s { color: var(--muted); font-size: 13px; margin: 2px 0; }
.oi .s b { color: var(--ink); }
.oi .pr { font-family: var(--f-display); font-size: 18px; font-weight: 800; }
.f { margin-bottom: 14px; }
.f > label, .f > .fl { display: block; font-weight: 700; color: #666; font-size: 14px; margin-bottom: 6px; }
.f input, .f textarea { width: 100%; background: var(--chip); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; font: inherit; font-size: 16px; color: var(--ink); }
.f textarea { min-height: 76px; resize: vertical; }
.f .sub { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.f .err-text { color: var(--sale); font-size: 12.5px; margin-top: 5px; }
.f input.err { border-color: var(--sale); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { flex: 1 1 auto; border: 1.5px solid var(--line); background: var(--chip); border-radius: 14px; padding: 13px 14px; font-weight: 700; }
.opt.on { border: 2px solid var(--ink); }
.promo { display: flex; gap: 8px; }
.promo input { flex: 1; min-width: 0; text-transform: uppercase; }
.promo button { border: 1.5px solid var(--line); border-radius: 16px; padding: 0 16px; font-weight: 700; background: var(--card); }
.promo-ok { color: #1f8a3b; font-size: 13px; margin-top: 6px; font-weight: 600; }
.total { display: flex; justify-content: space-between; align-items: center; border-top: 1.5px dashed var(--line); padding-top: 14px; margin: 6px 0 14px; color: #666; font-weight: 700; gap: 10px; }
.total b { font-family: var(--f-display); font-size: 26px; color: var(--ink); white-space: nowrap; }
.total s { color: var(--muted); font-size: 14px; margin-right: 8px; font-weight: 600; }
.fine { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.4; }
.size-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.size-pick .size { padding: 8px 0; }
.size-pick .size b { font-size: 15px; }
.ok { text-align: center; padding-block: 6px 18px; }
.ok-em { font-size: 56px; line-height: 1; margin-bottom: 14px; }
.ok h2 { margin-bottom: 10px; }
.ok p { margin: 0; color: var(--muted); line-height: 1.5; }
.ok p b { color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: calc(190px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 16px; font-weight: 600; z-index: 60; max-width: 86%; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ttl { font-family: var(--f-display); font-size: 22px; margin: 18px 0 12px; }
.err-box { background: #fff; border: 1.5px dashed var(--line); border-radius: 16px; padding: 18px; text-align: center; color: var(--muted); grid-column: 1 / -1; line-height: 1.5; }
.err-box button { margin-top: 12px; }
/* Старые WebView без aspect-ratio: квадратные фото через отступ */
@supports not (aspect-ratio: 1) {
  .ph::before { content: ""; display: block; padding-top: 100%; }
  .ph img { position: absolute; top: 0; left: 0; }
  .slides { height: 100vw; max-height: 520px; }
}
@media (max-width: 360px) {
  .sizes { grid-template-columns: repeat(4, 1fr); }
  .count { display: none; }
  .filters-btn small { display: none; }
}
