/*
 * Сайт 2KOLESA Moto Hub (магазин и Moto Hub), стили.
 * Цвета и правила — по брендбуку и дизайн-системе на холсте
 * «2KOLESA Moto Hub: сайт для телефона». Сначала телефон, потом компьютер.
 * На коралловой кнопке текст сливовый (белый на коралловом не проходит
 * контраст 4.5:1). Одна коралловая кнопка на экран.
 */

:root {
  --plum: #320932;
  --plum-2: #4a1c47;
  --plum-line: #7a4c76;
  --white: #fcfcfc;
  --pink: #f3a4a1;
  --coral: #e94c45;
  --surface: #f5ecf2;
  --field: #d9c7d4;
  --line: #efe4ec;
  --muted: #6b5468;
  --muted-on-plum: #d9cbd8;
  --radius: 16px;
  --tap: 52px;
  --nav-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--plum);
  font: 400 16px/1.5 Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

a { color: inherit; }
a:hover { color: var(--coral); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Полоса «тестовая версия» ---------- */
.dev-bar {
  background: var(--pink); color: var(--plum);
  font-size: 13px; line-height: 1.35; padding: 6px 12px; text-align: center;
}
/* На телефоне — короткий текст в одну строку (длинный занимал две и отнимал 47 px экрана) */
.dev-short { display: none; }
@media (max-width: 599px) {
  .dev-long { display: none; }
  .dev-short { display: inline; }
}

/* ---------- Шапка ----------
   Полоса с адресом, телефоном и языками уезжает со страницей; при прокрутке остаётся одна
   строка: логотип, поиск и значки (владелец 13.11). На телефоне звонок и корзина — в нижнем меню. */
.head-strip { background: var(--plum); color: var(--white); }
.head-strip .wrap { display: flex; align-items: center; gap: 10px; min-height: 46px; padding-top: 6px; }
.head-strip .addr { margin-right: auto; }
.head-strip .phone { display: none; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--plum); color: var(--white);
}
.site-header .row1 { display: flex; align-items: center; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.logo { flex: none; }
.logo img { width: 104px; height: 30px; }
.head-search { position: relative; flex: 1; min-width: 0; display: flex; }
.head-search input {
  width: 100%; height: 44px; padding: 0 48px 0 14px; border: 0; border-radius: 12px;
  background: var(--white); color: var(--plum); font: inherit; font-size: 16px;
}
.head-search input::placeholder { color: var(--muted); opacity: .9; }
.head-search input:focus { outline: 2px solid var(--coral); outline-offset: 1px; }
.head-search button {
  position: absolute; top: 3px; right: 3px; width: 38px; height: 38px; border: 0; border-radius: 10px;
  background: var(--coral); color: var(--plum); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.head-ico { display: none; }
.lang { display: flex; flex: none; padding: 3px; border-radius: 12px; background: var(--plum-2); }
.lang a, .lang span {
  min-width: 36px; height: 32px; padding: 0 6px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; text-decoration: none; color: var(--muted-on-plum);
}
.lang [aria-current="true"] { background: var(--white); color: var(--plum); font-weight: 800; }
.lang span { opacity: .55; cursor: default; }
.addr {
  display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 40px;
  color: var(--muted-on-plum); font-size: 14px; text-decoration: none;
}
.addr .ico { color: var(--pink); }
.addr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone {
  flex: none; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border-radius: 12px; background: var(--plum-2); color: var(--white);
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.phone .ico, .head-tel .ico { color: var(--coral); }
.phone:hover { color: var(--pink); }
.ico { flex: none; }

/* ---------- Кнопки ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 20px; border-radius: var(--radius);
  font: inherit; font-size: 17px; font-weight: 800; text-decoration: none; cursor: pointer;
  border: 0;
}
.btn-main { background: var(--coral); color: var(--plum); }
.btn-main:hover { color: var(--plum); filter: brightness(1.05); }
.btn-dark { background: var(--plum); color: var(--white); font-weight: 700; }
.btn-dark:hover { color: var(--pink); }
.btn-line { border: 2px solid var(--plum); color: var(--plum); font-weight: 700; background: transparent; }
.btn-line-pink { border: 2px solid var(--pink); color: var(--white); font-weight: 700; background: transparent; }
.btn-line-pink:hover { color: var(--pink); }

/* ---------- Блоки главной (конструктор) ---------- */
.blk { position: relative; padding: 40px 0; }
.blk h2 { margin: 0 0 10px; font-size: 28px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }
.blk .intro { margin: 0 0 18px; max-width: 40em; font-size: 16px; line-height: 1.5; color: var(--muted); }
/* Метка «из какого проекта блок» — только в тестовой версии (body.is-test) */
body:not(.is-test) .blk-tag { display: none; }
.blk-tag {
  position: absolute; top: 10px; right: 12px; z-index: 3;
  padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.4;
  background: rgba(252, 252, 252, .85); color: var(--muted); border: 1px dashed var(--field);
  max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.split { display: grid; gap: 24px; align-items: center; }

/* Первый экран: фото работы сервиса во весь экран */
.hero { overflow: hidden; background: var(--plum); color: var(--white); padding: 0; min-height: 600px; display: flex; align-items: flex-end; }
.hero-photo, .hero-pattern { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(50, 9, 50, .1) 0%, rgba(50, 9, 50, .55) 45%, var(--plum) 88%); }
.hero.has-photo .hero-shade { background: linear-gradient(180deg, rgba(50, 9, 50, .2) 0%, rgba(50, 9, 50, .7) 50%, var(--plum) 92%); }
.hero.has-map .hero-shade { background: linear-gradient(180deg, rgba(50, 9, 50, 0) 0%, rgba(50, 9, 50, 0) 36%, rgba(50, 9, 50, .8) 56%, var(--plum) 90%); }
/* Карта: «сцена» с пропорциями картинки накрывает блок (как cover),
   подпись у метки в процентах сцены.
   Телефон — вертикальная картинка 1438×2576 (0.5582): метка 65% по ширине,
   34% (головка) и 39% (острие) по высоте, Толе би на 38%.
   Компьютер — горизонтальная 2576×1438 (1.7914): метка 66% / 28–35%, Толе би на 42%. */
.hero-bg { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.map-stage {
  position: absolute; top: 0; left: 50%;
  /* телефон: карта по ширине экрана целиком, ниже неё сливовый фон */
  width: 100cqw; height: calc(100cqw / .5582);
  transform: translateX(-50%);
}
.map-stage picture, .map-img { display: block; width: 100%; height: 100%; }
/* Слой подписей над затемнением и текстом: клики проходят насквозь, кроме карточки */
.hero-labels { z-index: 3; pointer-events: none; }
.hero-labels .map-card { pointer-events: auto; }
.hero-shade { pointer-events: none; }
.map-card {
  position: absolute; right: 3%; bottom: 68.3%;
  display: flex; flex-direction: column; gap: 2px; width: max-content; max-width: 260px;
  padding: 7px 12px; border-radius: 12px; background: rgba(50, 9, 50, .88);
  border: 1px solid var(--coral); color: var(--white); font-size: 13px; line-height: 1.35; text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.map-card:hover { color: var(--pink); }
.map-card-title { font-size: 15px; font-weight: 800; color: var(--white); }
.map-card-hours { color: var(--pink); font-weight: 600; }
/* Телефон: адрес уже в шапке, в карточке только название и часы — так она не закрывает подпись парка. */
.map-card-addr { display: none; }
/* Телефон: Толе би на ~68% ширины экрана от верха карты, текст сразу под ней. */
.hero.has-map .inner { padding-top: calc(70vw + 28px); }
.hero .inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 14px; padding-top: 180px; padding-bottom: 36px; }
.hero .kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); }
.hero h1 { margin: 0; font-size: 38px; line-height: 1.06; font-weight: 800; letter-spacing: -.02em; }
.hero h1 .pink { color: var(--pink); }
.hero h1 .coral { color: var(--coral); }
.hero .lead { margin: 0; max-width: 36em; font-size: 17px; line-height: 1.45; color: #e4d8e3; }
.hero .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* Многопрофильная команда */
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.team-card {
  display: flex; flex-direction: column; gap: 8px; min-height: 170px; padding: 16px; border-radius: 18px;
  background: var(--surface); text-decoration: none;
}
.team-card .t { font-size: 17px; font-weight: 800; line-height: 1.2; }
.team-card .d { font-size: 14px; line-height: 1.4; color: var(--muted); }
.team-card:hover { color: var(--plum); box-shadow: inset 0 0 0 2px var(--plum); }

/* Магазин и доска */
.market { background: var(--white); border-top: 1px solid var(--line); }
.market-grid { display: grid; gap: 36px; }
.market-col h2 { margin-bottom: 6px; }

/* «Горячее предложение» перед «Магазином» (владелец 16.11): до пяти карточек по фиксированной цене.
   Телефон — листаются вбок, компьютер — сеткой; одно предложение — во всю ширину */
.deals { background: var(--surface); }
.deals-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; overscroll-behavior-x: contain; }
.deal {
  flex: 0 0 84%; min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column;
  border-radius: var(--radius); background: var(--white); overflow: hidden; box-shadow: 0 1px 2px rgba(50, 9, 50, .08);
}
.deals-n1 .deal { flex-basis: 100%; }
.deal-media { position: relative; display: block; aspect-ratio: 4 / 3; background: #fff; }
.deal-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.deal-media .pcard-img, .deal-media .pcard-ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.deal-badge {
  position: absolute; left: 10px; top: 10px; padding: 6px 10px; border-radius: 999px;
  background: var(--coral); color: var(--plum); font-size: 15px; font-weight: 800; line-height: 1.2; white-space: nowrap;
}
.deal-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px; min-width: 0; }
.deal-name { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 800; overflow-wrap: anywhere; }
.deal-name a { color: var(--plum); text-decoration: none; }
.deal-items { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.deal-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 4px 0 0; }
.deal-price b { font-size: 24px; font-weight: 800; white-space: nowrap; }
.deal-price s { font-size: 16px; color: var(--muted); white-space: nowrap; }
.deal-term { margin: 0; font-size: 14px; color: var(--muted); }
.deal-term.in-stock { color: #1d7a46; }
.deal-buy { display: grid; gap: 8px; margin-top: auto; padding-top: 8px; }
.deal .in-cart { background: var(--surface); }
/* Карточка горячего предложения: «по отдельности» под ценой и состав */
.deal-was { margin: 12px 0 0; font-size: 16px; color: var(--muted); }
.deal-was s { white-space: nowrap; }
.deal-was b { color: var(--plum); white-space: nowrap; }
.deal-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.deal-list li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface); min-width: 0; }
.deal-list a { color: var(--plum); font-weight: 700; overflow-wrap: anywhere; }
.deal-list span { font-size: 14px; color: var(--muted); }
@media (min-width: 720px) {
  .deals-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); overflow: visible; scroll-snap-type: none; padding-bottom: 0; }
  .deals-n1 { grid-template-columns: minmax(0, 1fr); }
  .deals-n1 .deal { flex-direction: row; }
  .deals-n1 .deal-media { flex: 0 0 44%; aspect-ratio: auto; min-height: 320px; }
  .deals-n1 .deal-body { padding: 24px; justify-content: center; }
  .deals-n1 .deal-name { font-size: 24px; }
  .deals-n1 .deal-buy { margin-top: 8px; max-width: 360px; }
}
.search-row { display: flex; gap: 8px; }
.search-row input {
  flex: 1; min-width: 0; height: 52px; padding: 0 14px; border-radius: 14px;
  border: 1.5px solid var(--field); background: #fff; color: var(--plum); font: inherit; font-size: 16px;
}
.search-row input:focus { border-color: var(--plum); outline: none; }
.search-row button {
  flex: none; width: 52px; height: 52px; border: 0; border-radius: 14px; background: var(--plum); color: var(--white);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); font-size: 14px; font-weight: 600; text-decoration: none;
}
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.tile {
  display: flex; align-items: flex-end; min-height: 96px; padding: 14px; border-radius: 16px;
  background: var(--surface); font-weight: 800; font-size: 16px; line-height: 1.2; text-decoration: none;
}
.tile-dark { background: var(--plum); color: var(--white); }
.tile-dark:hover { color: var(--pink); }
.soon { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* Карта мотоциклиста */
.mapblk { background: var(--white); border-top: 1px solid var(--line); }
.mapblk .art { width: 100%; height: auto; border-radius: 24px; }
.ticks { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--coral); }

/* Сообщество */
.community { overflow: hidden; background: var(--plum); color: var(--white); }
.community h2 { color: var(--white); }
.community .intro { color: var(--muted-on-plum); }
.community-mark { position: absolute; right: -80px; bottom: -60px; width: 300px; height: 312px; opacity: .1; }
.community-grid { position: relative; display: grid; gap: 10px; margin-bottom: 20px; }
.community-card { padding: 16px; border-radius: 16px; background: var(--plum-2); }
.community-card .t { display: block; font-weight: 800; font-size: 17px; }
.community-card .d { display: block; margin-top: 4px; font-size: 14px; color: var(--muted-on-plum); }
.community .btn { position: relative; }

/* Instagram */
.insta .head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.insta .more { font-weight: 600; font-size: 15px; }
.insta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 4px 0 18px; }
.insta-tile {
  aspect-ratio: 1; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: #e9dce6; color: #b49caf;
}
.insta-tile:nth-child(3n+2) { background: #f0e3ec; }
.insta-tile:hover { color: var(--plum); }
.insta-tile.has-img { position: relative; overflow: hidden; background: #e9dce6; }
.insta-tile.has-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.insta-play {
  position: absolute; top: 6px; right: 6px; display: flex; width: 28px; height: 28px; border-radius: 50%;
  align-items: center; justify-content: center; background: rgba(50, 9, 50, .55); color: var(--white);
}

/* Отзывы */
.reviews { background: var(--surface); }
.reviews-card { padding: 20px; border-radius: 20px; background: var(--white); max-width: 620px; }
.reviews-card .stars { display: flex; gap: 2px; margin-bottom: 10px; }
.reviews-card p { margin: 0 0 16px; color: var(--muted); }
/* Отзывы Google (Home\GoogleReviews): на телефоне листаются вбок, на компьютере — сеткой */
.reviews .head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.reviews .more { font-weight: 600; font-size: 15px; }
.rv-score { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.rv-score b { color: var(--plum); font-size: 18px; }
.rv-stars { display: inline-flex; gap: 2px; margin: 0; }
.rv-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-bottom: 14px; overscroll-behavior-x: contain; }
.rv-card {
  flex: 0 0 84%; scroll-snap-align: start; min-width: 0; display: flex; flex-direction: column; gap: 8px;
  padding: 16px; border-radius: 18px; background: var(--white);
}
.rv-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rv-ava {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--plum); color: var(--white); font-weight: 700; font-size: 17px;
}
.rv-who { display: grid; min-width: 0; }
.rv-who a, .rv-who b { font-weight: 700; color: var(--plum); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-who small { color: var(--muted); font-size: 13px; }
.rv-text {
  margin: 0; font-size: 15px; line-height: 1.5; color: var(--plum); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; line-clamp: 8; overflow: hidden;
}
.reviews .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rv-src { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
@media (min-width: 720px) {
  /* Три отзыва в ряд, остальные — прокруткой вбок (их до пяти: сетка 3 + 2 смотрелась рваной) */
  .rv-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 3); }
}

/* Связь */
.contact .direct { display: grid; gap: 10px; }
.contact-form { display: grid; gap: 6px; padding: 18px; border-radius: 20px; background: var(--surface); }
.contact-form label { font-size: 14px; font-weight: 700; margin-top: 6px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--field);
  background: #fff; color: var(--plum); font: inherit; font-size: 16px;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--plum); outline: none; }
.contact-form .btn { margin-top: 12px; }

/* ---------- Контакты и подвал ---------- */
.contacts { margin-top: 0; padding: 28px 0 24px; background: var(--plum); color: var(--white); }
.contacts h2 { margin: 0 0 14px; font-size: 26px; font-weight: 800; }
.contacts .line { margin: 0 0 6px; font-size: 16px; }
.contacts .muted { color: var(--muted-on-plum); }
.contacts .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.contacts .grid3 a {
  display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 14px;
  border: 1.5px solid var(--plum-line); color: var(--white); font-weight: 700; text-decoration: none; font-size: 15px;
}
.contacts .grid3 a.wa { background: var(--coral); border-color: var(--coral); color: var(--plum); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #5a2a56; font-size: 14px; }
.footer-links a { color: var(--muted-on-plum); }
.build { margin-top: 14px; font-size: 12px; color: var(--muted-on-plum); opacity: .8; }

/* ---------- Простые страницы (поиск, 404) ---------- */
.page { padding-top: 28px; padding-bottom: 40px; }
.page h1 { margin: 0 0 10px; font-size: 28px; line-height: 1.15; font-weight: 800; }
.page p { margin: 0 0 16px; color: var(--muted); max-width: 36em; }
.page .actions { display: grid; gap: 10px; max-width: 420px; }

/* ---------- Нижняя панель (телефон) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
  background: var(--white); border-top: 1px solid #e8dce4; box-shadow: 0 -6px 20px rgba(50, 9, 50, .08);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0;
  font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.tabbar a[aria-current="page"] { color: var(--plum); font-weight: 700; }
.tabbar a[aria-current="page"] svg { color: var(--coral); }
/* Корзина: значок со счётчиком (нижнее меню на телефоне, шапка на компьютере) */
.tab-ico, .head-cart { position: relative; display: inline-flex; }
.cart-n { position: absolute; top: -5px; right: -11px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--coral); color: var(--plum); font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; }
.cart-n[hidden] { display: none; }
.cart-n.bump { animation: cart-bump .5s ease; }
@keyframes cart-bump { 0% { transform: scale(1); } 35% { transform: scale(1.5); } 100% { transform: scale(1); } }
.head-cart { display: none; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--plum-2); color: var(--white); }
.head-cart:hover, .head-ico:hover { color: var(--pink); }
.head-cart .cart-n { top: -4px; right: -6px; }

/* ---------- Режим приложения ----------
   Класс k2-app на <html> ставит приложение 2KOLESA до скриптов страницы
   (claude/приложение-режим-приложения.md, задание чата «Приложение» 13.11). Сверху уже полоса
   приложения (на главную, все разделы, колокольчик, профиль), поэтому логотип и полоса с адресом,
   телефоном и языками не нужны: остаётся строка поиска. «Главная» нижнего меню ведёт на главную
   сайта, а главная в приложении одна — у приложения; первым пунктом становится «Каталог».
   Страница сообщает приложению, что умеет это сама, тегом <meta name="k2-app" content="ready">. */
.k2-app .head-strip, .k2-app .site-header .logo, .k2-app .tabbar > a[href="/"] { display: none; }
.k2-app .tabbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Каталог ---------- */
.shop h1 { margin-bottom: 4px; }
.shop-sub { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.shop-search { margin-bottom: 18px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.size-pick { margin: 0 0 22px; padding: 16px; border-radius: 20px; background: var(--plum); color: var(--white); }
.size-pick h2 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.size-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.size-row:last-child { margin-bottom: 0; }
.size-row label { display: grid; gap: 4px; flex: 1; font-size: 12px; color: var(--muted-on-plum); }
.size-row .slash { padding-bottom: 14px; font-weight: 800; color: var(--pink); }
.size-row select, .filters select, .filters input {
  width: 100%; height: 48px; padding: 0 10px; border: 2px solid var(--field); border-radius: 12px;
  background: var(--white); color: var(--plum); font: inherit; font-size: 16px;
}
/* Обычные списки — с той же стрелкой, что у списков с галочками */
.size-row select, .filters select {
  -webkit-appearance: none; appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23320932' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.size-row .btn { flex: 1.4; min-height: 48px; }
.cat-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cat-tile { min-width: 0; padding: 14px; border-radius: 16px; background: var(--surface); }
.cat-head { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--plum); }
.cat-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--white); }
.cat-ico .ico { width: 32px; height: 32px; }
.cat-name { flex: 1; font-size: 18px; font-weight: 800; }
.cat-count { font-size: 14px; color: var(--muted); }
/* Плашки подразделов: картинка (мотоцикл или предмет), название, число */
/* Рядами по три, листать только вниз (владелец 07.11: вбок — неочевидно) */
.sub-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; margin: 0 0 18px; }
.cat-tile .sub-tiles { margin: 12px 0 0; }
.sub-tile { min-width: 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--plum); }
.sub-tile:hover { color: var(--plum); }
.sub-tile:hover .sub-pic { box-shadow: inset 0 0 0 2px var(--field); }
.sub-pic { position: relative; display: flex; align-items: center; justify-content: center; height: 74px; margin-bottom: 4px; border-radius: 14px; background: var(--surface); color: var(--plum); }
.cat-tile .sub-pic { background: var(--white); }
.sub-ico { width: 44px; height: 44px; }
.sub-pic.is-bike .sub-ico { width: 92%; max-width: 110px; height: 62px; }
.sub-pic .side { position: absolute; right: 4px; bottom: 4px; padding: 2px 6px 2px 2px; font-size: 11px; }
.sub-pic .side-ico { width: 18px; height: 18px; }
.sub-name { font-size: 13px; font-weight: 700; line-height: 1.25; }
.sub-n { font-size: 12px; color: var(--muted); }

/* Значок «перед / зад»: колесо, на которое ставится, — коралловое */
.side { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--white); color: var(--plum); font-size: 12px; font-weight: 700; line-height: 1.2; box-shadow: 0 1px 4px rgba(50, 9, 50, .14); white-space: nowrap; }
.side-ico { width: 22px; height: 22px; flex: none; }
.p-side { margin: 0 0 8px; }
.p-side .side { padding: 5px 12px 5px 6px; font-size: 14px; background: var(--surface); box-shadow: none; }
.p-side .side-ico { width: 26px; height: 26px; }
.filters { display: grid; gap: 10px; margin: 0 0 18px; }
.filters label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.f-size { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.f-more { border-radius: 12px; background: var(--surface); }
.f-more summary { padding: 12px 14px; font-weight: 700; font-size: 15px; cursor: pointer; }
.f-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 14px 14px; }
/* Порядок без остальных фильтров (поиск): одна строка «Сначала [дешевле]» */
.filters > .f-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.filters > .f-sort select { width: auto; min-width: 160px; }
/* Фильтр с одним вариантом — подпись вместо выбора */
.f-fixed { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.f-fixed b { display: flex; align-items: center; height: 48px; padding: 0 12px; border-radius: 12px; background: var(--surface); color: var(--plum); font-size: 16px; font-weight: 700; }
.f-more .f-fixed b { background: var(--white); }
/* Мультивыбор: поле как список, внутри галочки. На телефоне — панель снизу экрана */
.ms-field { position: relative; display: grid; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted); }
.ms > summary { position: relative; display: flex; align-items: center; height: 48px; padding: 0 28px 0 10px; border: 2px solid var(--field); border-radius: 12px; background: var(--white); color: var(--plum); font-size: 16px; list-style: none; cursor: pointer; }
.ms > summary::-webkit-details-marker { display: none; }
.ms > summary::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--plum); border-bottom: 2px solid var(--plum); transform: translateY(-70%) rotate(45deg); }
.ms > summary.has-value { border-color: var(--plum); font-weight: 700; }
.ms[open] > summary { border-color: var(--plum); }
.ms-val { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Список открывается прямо под полем, где палец (правило владельца 08.11:
   нажал здесь — ответ здесь, не внизу экрана). shop.js сдвигает его в
   пределы экрана и докручивает страницу, если он не помещается. */
.ms-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; display: flex; flex-direction: column; width: min(360px, calc(100vw - 32px)); max-height: 60vh; padding: 14px; border-radius: 16px; background: var(--white); color: var(--plum); font-size: 16px; box-shadow: 0 14px 40px rgba(50, 9, 50, .28), 0 0 0 1px var(--line); scroll-margin: 12px 0 96px; }
.ms-title { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.ms-title small { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.ms-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 2px; overflow-y: auto; }
.ms-list.is-text { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms .ms-opt { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 12px; border: 2px solid var(--field); border-radius: 12px; color: var(--plum); font-size: 16px; font-weight: 600; cursor: pointer; }
.ms-opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ms .ms-opt[hidden] { display: none; }
.ms > summary.is-auto { font-weight: 700; }
.ms-n { font-weight: 400; opacity: .8; }
.size-row .ms-field { flex: 1; color: var(--muted-on-plum); }
.size-row .ms > summary { border-color: transparent; }
.size-row .ms > summary.has-value, .size-row .ms[open] > summary { border-color: var(--pink); }
button[type="submit"]:disabled { opacity: .45; cursor: default; }
.ms .ms-opt input { flex: none; width: 22px; height: 22px; margin: 0; padding: 0; border: 0; accent-color: var(--plum); }
.ms .ms-opt:has(input:checked) { border-color: var(--plum); background: var(--surface); }
.ms-foot { display: flex; gap: 10px; margin-top: 14px; }
.ms-ok { flex: 1; min-height: 50px; }
.ms-clear { min-height: 50px; padding: 0 18px; border: 2px solid var(--field); border-radius: 12px; background: var(--white); color: var(--plum); font: inherit; font-weight: 700; cursor: pointer; }
/* С JavaScript фильтр применяется сразу, кнопка не нужна */
.js .filters[data-auto] .f-submit { display: none; }
.js .filters[data-auto] .f-actions:not(:has(.reset)) { display: none; }
.filters.is-loading ~ .pgrid, .filters.is-loading ~ .empty { opacity: .45; transition: opacity .2s; }
.f-actions { display: flex; align-items: center; gap: 16px; }
.f-actions .btn { min-height: 48px; flex: 1; max-width: 260px; }
.filters .reset { font-size: 14px; color: var(--muted); }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--plum); }
.pcard:hover { color: var(--plum); border-color: var(--field); box-shadow: 0 6px 20px rgba(50, 9, 50, .08); }
.pcard-media { position: relative; display: block; margin-bottom: 6px; }
.pcard-img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; }
.pcard-img.is-photo { object-fit: contain; background: var(--white); }
/* Пока фото нет: рисунок предмета по подразделу (звезда, колодка, масло…) */
.pcard-ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 12px; background: var(--surface); color: var(--plum); }
.pcard-ph .ico { width: 46%; height: 46%; }
.g-empty .pcard-ph { max-width: 240px; margin: 0 auto; border-radius: 20px; }
.pcard-media .side { position: absolute; left: 6px; top: 6px; }
.pcard-name { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.9em; color: var(--plum); text-decoration: none; }
/* Вся карточка — ссылка на товар (растянутая ссылка названия), кроме кнопки «В корзину».
   Растягивается обёртка, а не само название: обрезка названия до трёх строк обрезала бы и её */
.pcard-link { display: block; color: var(--plum); text-decoration: none; }
.pcard-link:hover { color: var(--plum); }
.pcard-link::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
/* Телефон: цена — отдельной строкой во всю ширину («от 137 000 ₸» не переносится), кнопка — в углу рядом со сроком */
.pcard-foot { position: relative; margin-top: auto; }
.pcard-pt { display: grid; min-width: 0; }
.pcard-price { font-size: 18px; font-weight: 800; white-space: nowrap; }
/* Товар без предложений: цены нет, «Под заказ через менеджера» (владелец 15.11) */
.pcard-ask { display: flex; align-items: flex-end; min-height: 44px; font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--muted); }
.pcard-foot .pcard-term { display: flex; align-items: flex-end; min-height: 44px; padding-right: 52px; }
.pcard-add { position: absolute; right: 0; bottom: 0; z-index: 1; margin: 0; }
.pcard-btn { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--coral); color: var(--plum); cursor: pointer; transition: background .15s, transform .15s; }
.pcard-btn:hover { background: #f06a63; }
.pcard-btn:active { transform: scale(.92); }
.pcard-btn:disabled { opacity: .6; }
.pb-plus { position: absolute; top: 5px; right: 6px; font-size: 14px; font-weight: 800; line-height: 1; }
.pb-n { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--coral); color: var(--plum); border: 2px solid var(--white); font-size: 11px; font-weight: 800; line-height: 16px; text-align: center; }
.pb-n:empty { display: none; }
.pcard-btn.is-added { background: var(--plum); color: var(--white); }
.pcard-btn.is-added .pb-plus { display: none; }
.pcard-btn.bump { animation: cart-bump .45s ease; }
.pcard-term, .term, .o-term { font-size: 13px; color: var(--muted); }
.in-stock { color: #1d7a46; font-weight: 600; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 22px 0 0; font-size: 15px; }
/* Подгрузка при прокрутке: «страницы» превращаются в кнопку «Показать ещё» и счётчик */
.pager.is-more { flex-direction: column; gap: 8px; }
.pager.is-more .pager-next { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); color: var(--plum); text-decoration: none; }
.pager.is-more .pager-pos { font-size: 13px; color: var(--muted); }
.pager.is-loading .pager-next { opacity: .55; pointer-events: none; }
.pager a { font-weight: 700; }
.empty { padding: 18px; border-radius: 16px; background: var(--surface); }
.empty p { margin: 0 0 12px; color: var(--plum); }
.product-grid { display: grid; gap: 18px; }
.product-media { position: relative; min-width: 0; }
.g-empty { position: relative; }
.g-empty img { width: 100%; height: auto; max-width: 240px; border-radius: 20px; display: block; margin: 0 auto; }
/* Галерея: главное фото листается свайпом, миниатюры под ним */
.g-stage { position: relative; }
.g-track { display: flex; aspect-ratio: 1; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px; background: var(--white); border: 1px solid var(--line); overscroll-behavior-x: contain; }
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; cursor: zoom-in; }
.g-slide img { width: 100%; height: 100%; object-fit: contain; }
.g-count { position: absolute; right: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(50, 9, 50, .72); color: var(--white); font-size: 13px; font-weight: 600; pointer-events: none; }
.g-nav { position: absolute; top: 50%; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 50%; background: rgba(252, 252, 252, .92); color: var(--plum); font-size: 28px; line-height: 36px; box-shadow: 0 2px 8px rgba(50, 9, 50, .18); cursor: pointer; display: none; }
.g-prev { left: 10px; }
.g-next { right: 10px; }
.g-nav:disabled { opacity: 0; pointer-events: none; }
.g-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.g-thumb { flex: none; width: 64px; height: 64px; border-radius: 12px; border: 2px solid var(--line); overflow: hidden; background: var(--white); }
.g-thumb.is-on { border-color: var(--plum); }
.g-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Просмотр фото на весь экран */
.lb-open, .lb-open body { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; background: #180418; }
.lb[hidden] { display: none; }
.lb-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; padding: 64px 8px; scroll-snap-align: center; }
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: var(--white); }
.lb-btn { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(252, 252, 252, .14); color: var(--white); font: 400 30px/46px Onest, system-ui, sans-serif; cursor: pointer; }
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(252, 252, 252, .28); }
.lb-close { top: max(10px, env(safe-area-inset-top)); right: 10px; }
.lb-nav { top: 50%; margin-top: -24px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-nav:disabled { opacity: .25; cursor: default; }
.lb-count { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); color: var(--muted-on-plum); font-size: 15px; font-weight: 600; }
.photo-note { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; padding: 4px 10px; border-radius: 999px; background: rgba(252, 252, 252, .9); font-size: 12px; color: var(--muted); }
.product h1 { font-size: 24px; line-height: 1.2; margin: 0 0 12px; }
.product h2 { margin: 26px 0 10px; font-size: 20px; font-weight: 800; }
.offers { display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: var(--surface); }
.offers .price { margin: 0; font-size: 30px; font-weight: 800; color: var(--plum); }
.offers .term { margin: 0; }
.offer { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 12px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); cursor: pointer; }
.offer input { grid-row: 1 / 3; align-self: center; width: 20px; height: 20px; accent-color: var(--coral); }
.offer:has(input:checked) { border-color: var(--plum); }
.o-price { font-size: 20px; font-weight: 800; }
.offers .price.is-range { font-size: 26px; }
.offers.is-ask .price { font-size: 22px; line-height: 1.2; }
/* «Подобрать заднюю / переднюю»: к блоку «В комплект» под карточкой */
.pick-pair { display: flex; align-items: center; gap: 10px; min-height: 56px; margin-top: 12px; padding: 8px 14px 8px 8px; border: 2px solid var(--line); border-radius: 16px; color: var(--plum); text-decoration: none; }
.pick-pair:hover { border-color: var(--plum); }
.pick-pair .side-ico { flex: none; width: 36px; height: 36px; }
.pick-pair > span { display: grid; flex: 1; min-width: 0; }
.pick-pair b { font-size: 16px; }
.pick-pair small { font-size: 13px; color: var(--muted); }
.pick-pair i { flex: none; font-style: normal; font-size: 22px; font-weight: 700; }
/* Пара в блоке покупки: список размеров этой модели на другую ось, рядом цена и срок выбранной (владелец 15.11) */
.pair-pick { display: grid; gap: 8px; padding: 12px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); }
.pair-pick label { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--plum); }
.pair-pick .side-ico { flex: none; width: 28px; height: 28px; }
.pair-pick select {
  width: 100%; min-width: 0; height: 48px; padding: 0 32px 0 10px; border: 2px solid var(--field); border-radius: 12px;
  background: var(--white); color: var(--plum); font: inherit; font-size: 16px; font-weight: 700;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23320932' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.pair-pick select:focus { border-color: var(--plum); outline: none; }
.pair-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin: 0; }
.pair-price[hidden], .pair-msg[hidden] { display: none; }
.pair-price b { font-size: 20px; font-weight: 800; color: var(--plum); white-space: nowrap; }
.pair-price span { font-size: 14px; color: var(--muted); }
.pair-price span.in-stock { color: #1d7a46; }
.pair-msg { margin: 0; font-size: 14px; font-weight: 600; color: var(--coral); }
@media (min-width: 720px) {
  /* на широком экране цена — справа от списка, в одну строку с ним */
  .pair-pick { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 14px; }
  .pair-pick label, .pair-msg { grid-column: 1 / -1; }
  .pair-price { flex-direction: column; align-items: flex-start; }
}
.related { scroll-margin-top: 84px; }
.o-hint, .o-note { grid-column: 2; margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: var(--muted); }
.offers > .o-hint, .offers > .o-note { grid-column: auto; margin: 0; }   /* одна колонка: цена, срок, подсказка, кнопка (иначе цена «от … до …» ломалась на три строки) */
.o-note { color: var(--plum); }
.o-head { margin: 6px 0 -2px; font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.offer.is-other .o-price { font-size: 18px; }
.order-note { margin: 0; font-size: 13px; color: var(--muted); }
/* «В корзине: N шт.» — сразу под кнопкой, где палец */
.in-cart { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--white); font-size: 15px; }
.in-cart[hidden] { display: none; }
.in-cart { scroll-margin-bottom: 96px; }
.fld-err[hidden] { display: none; }
.in-cart a { color: var(--plum); font-weight: 800; }
.btn.is-added { background: var(--plum); color: var(--white); }

/* ---------- Корзина и оформление ---------- */
.cart, .order-page, .status-page { max-width: 760px; }
.notice { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface); color: var(--plum); }
.cart-lines { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.cl { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "pic main del" "pic qty sum"; align-items: center; gap: 8px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); transition: opacity .2s; }
.cl.is-busy { opacity: .55; }
.cl-pic { grid-area: pic; align-self: start; display: block; width: 64px; height: 64px; overflow: hidden; border-radius: 12px; background: var(--surface); }
.cl-pic img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.cl-pic .pcard-ph { aspect-ratio: auto; width: 64px; height: 64px; }
.cl-main { grid-area: main; display: grid; gap: 2px; min-width: 0; }
.cl-name { font-weight: 700; line-height: 1.3; color: var(--plum); text-decoration: none; }
.cl-term, .cl-price { font-size: 13px; color: var(--muted); }
.cl-term.in-stock { color: #1d7a46; }
.cl-qty { grid-area: qty; display: flex; align-items: center; gap: 4px; }
.cl-qty form, .cl-del { margin: 0; }
.q-btn { width: 42px; height: 42px; border: 2px solid var(--field); border-radius: 12px; background: var(--white); color: var(--plum); font: inherit; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; }
.q-btn:disabled { opacity: .35; cursor: default; }
.q-val { min-width: 30px; font-size: 17px; font-weight: 800; text-align: center; }
.cl-sum { grid-area: sum; justify-self: end; font-size: 16px; white-space: nowrap; }
.cl-del { grid-area: del; justify-self: end; align-self: start; }
/* Услуга сервиса к строке — галочка прямо под товаром */
.cl-svc { grid-area: svc; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px dashed var(--field); border-radius: 12px; font-size: 14px; cursor: pointer; }
.cl-svc input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--plum); }
.cl-svc span { font-size: 15px; }
.cl-svc small { font-size: 13px; color: var(--muted); }
.cl-svc:has(input:checked) { border-style: solid; border-color: var(--plum); background: var(--surface); }
.ct-svc { margin: 0 0 6px; font-size: 15px; color: var(--plum); }
.ct-svc[hidden], [data-need-svc][hidden] { display: none; }
.svc-box { display: grid; gap: 8px; margin: 0 0 14px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); min-width: 0; }
.svc-box legend { float: left; width: 100%; margin: 0 0 4px; padding: 0; font-size: 18px; font-weight: 800; color: var(--plum); }
.svc-box legend + * { clear: both; }
.svc-box .pay-opt > span { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.svc-box .fld { margin-top: 4px; }
.svc-box [data-svc-group][hidden] { display: none; }
.o-lines li.o-svc { margin-top: -4px; padding: 8px 14px; border-style: dashed; }
.o-lines li.o-svc span { font-weight: 600; }
.cl-del button { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -6px -6px 0 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.cl-del button:hover { background: #fdecea; color: #c0392b; }
.cart-total { margin: 0 0 26px; padding: 14px 16px; border-radius: 16px; background: var(--surface); }
.ct-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; max-width: none; margin: 0; font-size: 17px; }
.ct-row b { font-size: 22px; font-weight: 800; white-space: nowrap; }
.ct-term { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.checkout { display: grid; gap: 12px; }
.checkout h2 { margin: 0; }
.fld { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.fld input, .fld textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); color: var(--plum); font: inherit; font-size: 16px; }
.fld textarea { min-height: 96px; resize: vertical; }
.fld input:focus, .fld textarea:focus { border-color: var(--plum); outline: none; }
.fld input[aria-invalid="true"] { border-color: var(--coral); }
.fld-err { margin: -4px 0 0; color: #b3261e; font-size: 14px; font-weight: 600; }
.form-err { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fde3e1; }
.pay { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.pay legend { margin-bottom: 4px; padding: 0; font-size: 13px; color: var(--muted); }
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); cursor: pointer; }
.pay-opt input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--plum); }
.pay-opt span { display: grid; gap: 2px; }
.pay-opt b { font-size: 16px; }
.pay-opt small { font-size: 13px; color: var(--muted); }
.pay-opt:has(input:checked) { border-color: var(--plum); background: var(--surface); }
.pay-note { margin: 0; font-size: 13px; color: var(--muted); }
.terms { padding: 0 14px; border-radius: 14px; background: var(--surface); }
.terms summary { padding: 14px 0; font-weight: 700; cursor: pointer; }
.terms-list { display: grid; gap: 8px; margin: 0 0 14px; padding-left: 20px; font-size: 14px; line-height: 1.45; }
.btn-wide { width: 100%; min-height: 56px; font-size: 17px; }
.agree { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.done { margin: 0 0 18px; padding: 20px; border-radius: 20px; background: var(--plum); color: var(--white); }
.done svg { color: var(--pink); }
.done h1 { margin: 8px 0; color: var(--white); }
.done p { margin: 0; line-height: 1.5; color: var(--muted-on-plum); }
.done b { color: var(--white); }
.o-status { font-size: 16px; }
.st { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface); color: var(--plum); font-weight: 700; }
.st-new { background: #fde3e1; }
.st-issued { background: #dff3e7; }
.st-cancelled, .st-archive { background: var(--line); color: var(--muted); }
.o-lines, .st-list { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.o-lines li, .st-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.o-lines a, .o-lines span { font-weight: 700; color: var(--plum); text-decoration: none; }
.o-lines small, .st-list small { grid-column: 1 / -1; color: var(--muted); }
.o-lines b { grid-row: 1 / 3; grid-column: 2; align-self: center; white-space: nowrap; }
.o-lines small { grid-column: 1; }
.o-total { padding: 12px 14px; border-radius: 14px; background: var(--surface); }
.o-next { margin-top: 26px; }
.shop .muted { color: var(--muted); font-size: 14px; }
.status-form { display: grid; gap: 10px; max-width: 480px; margin-bottom: 14px; }
.st-num { font-weight: 800; }
.no-offer { color: var(--muted); }
.specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th, .specs td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.specs th { width: 48%; padding-right: 12px; font-weight: 400; color: var(--muted); }
.specs td { font-weight: 600; }
.specs-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.descr { line-height: 1.55; color: var(--plum); max-width: 40em; }
/* Под карточкой: «в комплект» и «этот размер у других» */
.related { margin-top: 34px; }
.product .related h2 { margin: 0 0 12px; font-size: 20px; }
.prow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.more-link { display: inline-block; margin-top: 12px; font-weight: 700; }

/* ---------- Страница установки ---------- */
.inst { padding-bottom: 40px; }
.inst-main { padding-top: 24px; }
.inst h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; }
.inst .muted { color: var(--muted); }
.inst .small { font-size: 13px; }
.inst-card { margin: 18px 0; padding: 18px; border-radius: 20px; background: var(--surface); overflow-x: auto; }
.inst-card h2 { margin: 0 0 12px; font-size: 21px; font-weight: 800; }
.inst-card h3 { margin: 16px 0 8px; font-size: 18px; }
.inst-form { display: grid; gap: 10px; max-width: 520px; margin-bottom: 8px; }
.inst-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.inst-form input, .inst-form select { min-height: 44px; padding: 8px 10px; border: 2px solid var(--field); border-radius: 12px; background: var(--white); font: inherit; }
.inst-table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 14px; background: var(--white); border-radius: 12px; overflow: hidden; }
.inst-table th, .inst-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.inst-list { padding-left: 18px; }
.inst-list li.bad { color: #a4361f; font-weight: 700; }
.inst-msg { padding: 12px 14px; border-radius: 12px; }
.inst-ok { background: #e3f4ea; color: #155c34; }
.inst-err { background: #fde4e3; color: #8a1d18; }
.inst .ok { color: #1d7a46; font-weight: 700; }
.inst .no { color: #b3261e; font-weight: 700; }
.inst-report { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--white); }
.inst-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.inline { display: inline-block; margin: 0; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* ---------- Компьютер ---------- */
@media (min-width: 1180px) {
  .head-tel span { display: inline; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .head-cart { display: inline-flex; }
  .head-strip .wrap { gap: 14px; min-height: 48px; }
  .head-strip .phone { display: flex; background: none; padding: 0; }
  .logo img { width: 132px; height: 38px; }
  .site-header .row1 { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .head-search { max-width: 620px; margin: 0 auto 0 14px; }
  .head-search input { height: 46px; }
  .head-search button { width: 40px; height: 40px; }
  .head-ico { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--plum-2); color: var(--white); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .head-ico .ico { color: var(--pink); }
  .head-tel span { display: none; }
  .blk { padding: 64px 0; }
  .blk h2 { font-size: 36px; }
  .hero { min-height: 680px; }
  .hero .inner { padding-top: 200px; padding-bottom: 72px; }
  .map-stage { width: max(100cqw, 100cqh * 1.7914); height: max(100cqh, 100cqw / 1.7914); }
  .map-card { left: 69%; top: 22%; right: auto; bottom: auto; }
  .map-card-addr { display: inline; }
  .map-card { padding: 10px 14px; border-radius: 14px; }
  /* Карта видна целиком: блок по пропорциям картинки, текст ниже Толе би
     (на картинке 42% высоты) и выше гор (85%), затемнение только слева снизу. */
  .hero.has-map { min-height: calc(100vw / 1.7914); align-items: flex-start; }
  .hero.has-map .inner { padding-top: calc(100vw / 1.7914 * .47); padding-bottom: 40px; gap: 10px; }
  .hero.has-map h1 { font-size: clamp(36px, 3.4vw, 54px); max-width: 680px; }
  .hero.has-map .lead { max-width: 560px; }
  .hero.has-map .hero-shade { background: radial-gradient(ellipse 62% 48% at 22% 70%, rgba(50, 9, 50, .92) 0%, rgba(50, 9, 50, .75) 55%, rgba(50, 9, 50, 0) 100%); }
  .hero h1 { font-size: 60px; max-width: 760px; }
  .hero .actions { flex-direction: row; }
  .hero .actions .btn { min-width: 240px; }
  .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .team-card { min-height: 200px; }
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
  .split { grid-template-columns: 1fr 1fr; gap: 48px; }
  .community-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .insta-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .insta .btn, .reviews .btn, .community .btn, .mapblk .btn, .board .btn { display: inline-flex; min-width: 260px; }
  .contacts .grid3 { max-width: 520px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .pcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
  .pcard-foot .pcard-term { display: block; min-height: 0; padding-right: 0; }
  .pcard-add { position: relative; right: auto; bottom: auto; flex: none; }
  /* Фильтры в одну строку: размеры, ось, бренд, порядок — ничего не свёрнуто (shop.js открывает блок) */
  .filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
  .f-size { flex: 0 1 470px; }
  .f-more { flex: 1 1 420px; }
  .f-more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .js .f-more[data-wide-open] { background: none; border-radius: 0; }
  .js .f-more[data-wide-open] > summary { display: none; }
  .js .f-more[data-wide-open] .f-more-grid { padding: 0; gap: 12px; }
  .js .f-more[data-wide-open] .f-fixed b { background: var(--surface); }
  .filters > .f-sort { margin-left: auto; }
  .filters .f-actions { flex-basis: 100%; }
  .js .filters[data-auto] .f-actions:not(:has(.reset)) { display: none; }
  .ms-panel { max-height: 440px; }
  .f-actions .btn { min-width: 180px; }
  .g-empty img, .g-empty .pcard-ph { max-width: 420px; }
  .g-nav { display: block; }
  .shop > .sub-tiles { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
  .shop > .sub-tiles .sub-pic { height: 86px; }
  .prow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .lb-slide { padding: 64px 80px; }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
  .size-pick { padding: 22px; }
  .product-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: start; }
  .product h1 { font-size: 30px; }
  .offers { max-width: 520px; }
}

/* ---------- Кабинет заказов магазина (/kabinet) ---------- */
body.cab { padding-bottom: 24px; background: var(--white); }
.cab-head { position: sticky; top: 0; z-index: 20; background: var(--plum); color: var(--white); }
.cab-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.cab-logo { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 800; text-decoration: none; }
.cab-logo:hover { color: var(--pink); }
.cab-out { display: flex; align-items: center; gap: 10px; margin: 0; }
.cab-user { max-width: 40vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted-on-plum); font-size: 14px; }
.cab-out button { min-height: 40px; padding: 0 14px; border: 2px solid var(--plum-line); border-radius: 12px; background: transparent; color: var(--white); font: inherit; font-weight: 700; cursor: pointer; }
.cab-nav { display: flex; gap: 4px; padding-bottom: 8px; }
.cab-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px; color: var(--muted-on-plum); font-weight: 700; text-decoration: none; }
.cab-nav a:hover { color: var(--white); }
.cab-nav a[aria-current="page"] { background: var(--plum-soft, rgba(252, 252, 252, .14)); color: var(--white); }
.cab-main { padding-top: 18px; padding-bottom: 24px; max-width: 860px; }
.cab-main h1 { margin: 0 0 10px; font-size: 26px; font-weight: 800; line-height: 1.2; }
.cab-main h1 .st { vertical-align: middle; font-size: 15px; }
.cab-login { max-width: 420px; }
.cab-unseen { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--coral); color: var(--plum); font-size: 14px; vertical-align: middle; }
.cab-search { display: flex; gap: 8px; margin: 0 0 12px; }
.cab-search input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); color: var(--plum); font: inherit; font-size: 16px; }
.cab-search input:focus { border-color: var(--plum); outline: none; }
.cab-search .btn { min-height: 48px; }
.cab-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.cab-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 12px; background: var(--surface); color: var(--plum); font-weight: 700; text-decoration: none; }
.cab-tabs a span { color: var(--muted); font-weight: 600; }
.cab-tabs a[aria-current="page"] { background: var(--plum); color: var(--white); }
.cab-tabs a[aria-current="page"] span { color: var(--pink); }
.cab-orders { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cab-order { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); color: var(--plum); text-decoration: none; }
.cab-order:hover { border-color: var(--field); color: var(--plum); }
.cab-order.is-unseen { border: 2px solid var(--coral); }
.co-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.co-num { font-size: 17px; }
.co-age { color: #b3261e; font-size: 13px; font-weight: 700; }
.co-who { font-weight: 600; }
.co-what { font-size: 14px; color: var(--muted); }
.co-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.co-bottom small { color: var(--muted); }
.cab-back { display: inline-block; margin-bottom: 10px; font-weight: 700; }
.cab-card { display: grid; gap: 10px; margin: 0 0 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); scroll-margin-top: 70px; }
.cab-card h2 { margin: 0; font-size: 20px; }
.cab-client { display: grid; gap: 2px; margin: 0; font-size: 18px; }
.cab-client span { font-size: 16px; color: var(--muted); }
.cab-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cab-actions .btn { min-height: 48px; padding: 0 8px; font-size: 15px; }
.cab-meta, .cab-comment { margin: 0; }
.cab-comment { padding: 10px 12px; border-radius: 12px; background: var(--surface); white-space: normal; }
.cab-flash { margin: 0; padding: 10px 12px; border-radius: 12px; background: #dff3e7; color: #14532d; font-weight: 700; }
.cab-flash.is-bad { background: #fde3e1; color: #b3261e; }
.cab-statuses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cab-statuses .pay-opt { padding: 10px 12px; }
.cab-other form { padding-bottom: 14px; }
.cab-history { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.cab-history li { display: grid; gap: 2px; padding-left: 12px; border-left: 3px solid var(--field); }
.cab-history small { color: var(--muted); }
.cab-history p { margin: 2px 0 0; }
.cab-history pre { margin: 6px 0 0; padding: 10px; border-radius: 10px; background: var(--surface); font: 13px/1.45 inherit; white-space: pre-wrap; }
.cab-history summary { color: var(--muted); font-size: 13px; cursor: pointer; }
@media (min-width: 900px) {
  .cab-statuses { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}


/* Кабинет: где есть товар строки заказа (несколько поставщиков) */
.o-lines .o-supply { grid-column: 1 / -1; display: grid; gap: 4px; margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--surface); list-style: none; }
.o-lines .o-supply li { display: block; padding: 0; border: 0; border-radius: 0; font-size: 13px; color: var(--plum); }
.o-lines .o-supply b { font-weight: 800; }

/* Кабинет: бронь склада под строкой заказа */
.o-lines .o-hold { grid-column: 1 / -1; margin: 4px 0 0; font-size: 13px; color: var(--plum); }
.o-lines .o-hold.is-active, .o-lines .o-hold.is-issued { color: #1d7a46; }
.o-lines .o-hold.is-short, .o-lines .o-hold.is-expired { color: #a4361f; font-weight: 700; }

/* Кабинет: склад на сайте */
/* Кабинет: раздел «Фото» — группы карточек и загрузка (владелец 13.11) */
.cab-back { margin: 0 0 6px; }
.cab-back a { color: var(--muted); font-weight: 700; text-decoration: none; }
.ph-sum { margin: 0 0 12px; color: var(--muted); }
.ph-sum b { color: var(--plum); }
.cab-photos > .cab-flash { margin: 0 0 12px; }
.ph-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ph-group { border: 1px solid var(--field); border-radius: 16px; background: var(--white); }
.ph-group[open] { border-color: var(--plum); }
.ph-group > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; cursor: pointer; list-style: none; }
.ph-group > summary::-webkit-details-marker { display: none; }
.ph-title { flex: 1; min-width: 0; font-weight: 700; line-height: 1.25; }
.ph-title small { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
.ph-n { flex: none; min-width: 40px; padding: 4px 10px; border-radius: 999px; background: var(--surface); text-align: center; font-weight: 800; }
.ph-state { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; }
.ph-state.is-own { background: #dff3e7; color: #14532d; }
.ph-state.is-none { background: #fde3e1; color: #b3261e; }
.ph-body { padding: 0 14px 14px; display: grid; gap: 10px; }
.ph-hint { margin: 0; color: var(--muted); font-size: 14px; }
.ph-thumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ph-thumbs li { display: grid; gap: 4px; justify-items: center; width: 84px; }
.ph-thumbs img { width: 84px; height: 84px; object-fit: contain; border: 1px solid var(--field); border-radius: 12px; background: var(--white); }
.ph-thumbs small { color: var(--muted); font-size: 12px; text-align: center; }
.ph-thumbs form { margin: 0; }
.ph-thumbs button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: #b3261e; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ph-form { display: grid; gap: 10px; margin: 0; }
.ph-form label { display: grid; gap: 4px; }
.ph-form label > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.ph-form input[type="file"], .ph-form input[type="url"] { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); color: var(--plum); font: inherit; font-size: 16px; }
.ph-form input:focus { border-color: var(--plum); outline: none; }
.ph-form .btn { min-height: 52px; }
.ph-form.is-busy, .ph-seed.is-busy { opacity: .6; pointer-events: none; }
.ph-open { justify-self: start; color: var(--plum); font-weight: 700; }
@media (min-width: 700px) {
  .ph-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
}
/* Кабинет: правка заказа и новый заказ менеджера (владелец 13.11) */
.cab-tg { scroll-margin-top: 80px; }
.cab-tg .cab-flash { margin: 12px 0 0; }
.cab-tg-form { margin: 8px 0 2px; }
.cab-tg-form .btn { min-height: 44px; }
.cab-new { margin: 0 0 12px; }
.cab-new .btn { min-height: 48px; }
.o-edit { grid-column: 1 / -1; margin-top: 6px; }
.o-edit > summary { display: inline-flex; align-items: center; min-height: 36px; color: var(--plum); font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; list-style: none; }
.o-edit > summary::-webkit-details-marker { display: none; }
.o-edit[open] > summary { margin-bottom: 8px; }
.o-edit-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; align-items: end; margin: 0; }
.o-edit-form label { display: grid; gap: 4px; min-width: 0; }
.o-edit-form label > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.o-edit-form input { width: 100%; min-height: 48px; padding: 0 12px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); color: var(--plum); font: inherit; font-size: 18px; font-weight: 700; }
.o-edit-form input:focus { border-color: var(--plum); outline: none; }
.o-edit-form .btn { min-height: 48px; }
.o-remove { min-height: 44px; padding: 0; border: 0; background: transparent; color: #b3261e; font: inherit; font-size: 14px; font-weight: 700; text-align: right; cursor: pointer; }
.o-lines li > .cab-flash { grid-column: 1 / -1; margin-top: 6px; }
.o-add { display: block; }   /* не сетка: у <details> сетка растягивает блок по самой широкой строке */
.o-add > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; font-size: 17px; cursor: pointer; list-style: none; }
.o-add > summary::-webkit-details-marker { display: none; }
.o-add > summary::before { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--plum); color: var(--white); font-size: 22px; font-weight: 600; line-height: 1; }
.o-add[open] > summary::before { content: "–"; }
.o-add[open] > summary { margin-bottom: 8px; }
.o-add > .cab-flash, .o-add > .notice { margin: 0 0 12px; }
.o-found { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.o-found li { padding: 12px; border-radius: 14px; background: var(--surface); display: grid; gap: 8px; }
.o-found p { margin: 0; line-height: 1.3; }
.o-found p small { color: var(--muted); }
.o-found form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 0; }
.o-found form > span { display: grid; gap: 1px; min-width: 0; }
.o-found form b { font-size: 17px; }
.o-found form small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.o-found .btn { min-height: 44px; }
.cab-statuses.o-pay { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .cab-statuses.o-pay { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Кабинет: раздел «Товары» — предложения, своя цена, скрыть (владелец 13.11) */
.pd-card > summary { gap: 10px; }
.pd-thumb { flex: none; width: 48px; height: 48px; border: 1px solid var(--field); border-radius: 10px; background: var(--surface); overflow: hidden; }
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--white); display: block; }
.pd-price { flex: none; white-space: nowrap; font-weight: 800; }
.pd-offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pd-offer { padding: 12px; border-radius: 14px; background: var(--surface); display: grid; gap: 8px; }
.pd-offer.is-off { background: transparent; border: 1px dashed var(--field); }
.pd-src, .pd-nums { margin: 0; }
.pd-src .ph-state { margin-left: 4px; background: var(--white); }
.pd-nums { color: var(--muted); font-size: 14px; }
.pd-nums b { color: var(--plum); }
.pd-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin: 0; }
.pd-form label { display: grid; gap: 4px; min-width: 0; }
.pd-form label > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.pd-form label small { font-weight: 500; }
.pd-form input[type="text"] { width: 100%; min-height: 48px; padding: 0 12px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); color: var(--plum); font: inherit; font-size: 18px; font-weight: 700; }
.pd-form input:focus { border-color: var(--plum); outline: none; }
.pd-form .btn { min-height: 48px; }
.pd-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.pd-toggle button { min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--plum); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.pd-toggle small { color: var(--muted); font-size: 12px; }
.pd-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pd-foot form { margin: 0; }
.pd-foot .btn { min-height: 44px; }
/* Кабинет: «Наценки» — наценка прайса по разделам (владелец 13.11) */
.cab-products .ph-sum .ph-open { margin-left: 8px; }
.pr-profile { margin: 0 0 14px; }
.pr-profile h2 { margin: 0 0 10px; font-size: 20px; font-weight: 800; }
.pr-profile h2 small { color: var(--muted); font-size: 14px; font-weight: 600; }
.pr-form { display: grid; gap: 10px; margin: 0; }
.pr-row { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--field); }
.pr-row.pr-default { border-top: 0; padding-top: 0; }
.pr-row p { margin: 0; }
.pr-row p small { display: block; color: var(--muted); font-size: 13px; }
.pr-fields { display: grid; grid-template-columns: minmax(0, 1fr) 72px 112px; gap: 6px; }
.pr-fields input, .pr-fields select { min-height: 48px; padding: 0 10px; border: 2px solid var(--field); border-radius: 14px; background: var(--white); color: var(--plum); font: inherit; font-size: 16px; }
.pr-fields input { width: 100%; font-weight: 700; }
.pr-fields input:focus, .pr-fields select:focus { border-color: var(--plum); outline: none; }
.pr-form > .btn { min-height: 52px; }
.pr-preview { padding: 14px; border-radius: 14px; background: var(--surface); display: grid; gap: 8px; scroll-margin-top: 120px; }
.pr-preview h3 { margin: 0; font-size: 17px; }
.pr-preview p { margin: 0; }
.pr-preview ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.pr-preview li small { color: var(--muted); }
.pr-preview .btn { min-height: 52px; }
@media (min-width: 700px) {
  .pr-row { grid-template-columns: minmax(0, 1fr) 340px; align-items: center; gap: 12px; }
}
/* Карточка товара: общее фото группы — честная подпись */
.g-sample { margin: 8px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

.cab-stock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); }
.cab-stock > p:first-of-type { flex: 1 1 200px; margin: 0; }
.cab-stock .cab-flash { flex-basis: 100%; margin: 0; }

/* Кабинет → «Горячее» (владелец 16.11): список предложений и страница предложения */
.cab-nav { overflow-x: auto; scrollbar-width: none; }
.cab-nav::-webkit-scrollbar { display: none; }
.cab-nav a { flex: none; }
@media (max-width: 400px) {
  .cab-nav { gap: 2px; }
  .cab-nav a { padding: 0 8px; font-size: 15px; }
}
/* карточки кабинета — сетка в одну колонку не шире экрана (длинные названия товаров переносятся) */
.dl-new, .dl-state, .dl-form, .dl-items, .dl-photo { grid-template-columns: minmax(0, 1fr); }
.dl-list { grid-template-columns: minmax(0, 1fr); }
.dl-row, .dl-parts li, .dl-found li { min-width: 0; }
.dl-field { display: grid; gap: 4px; min-width: 0; }
.dl-field > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.dl-field small { font-weight: 500; }
.dl-field input, .dl-field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--field); border-radius: 14px;
  background: var(--white); color: var(--plum); font: inherit; font-size: 17px;
}
.dl-field textarea { min-height: 96px; resize: vertical; font-size: 16px; line-height: 1.45; }
.dl-field input:focus, .dl-field textarea:focus { border-color: var(--plum); outline: none; }
.dl-new .btn, .dl-form .btn, .dl-state .btn { min-height: 48px; }
.dl-head { margin: 18px 0 8px; font-size: 20px; }
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dl-row { display: flex; align-items: stretch; gap: 6px; border: 1px solid var(--field); border-radius: 16px; background: var(--white); scroll-margin-top: 70px; }
.dl-list.is-off .dl-row { border-style: dashed; }
.dl-main {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 4px 10px;
  padding: 10px 12px; color: var(--plum); text-decoration: none;
}
.dl-main .pd-thumb { grid-row: span 2; }
.dl-price { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.dl-price b { white-space: nowrap; }
.dl-price small { color: #1d7a46; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dl-move { flex: none; display: grid; border-left: 1px solid var(--line); }
.dl-move form { margin: 0; display: flex; }
.dl-move button { width: 44px; min-height: 36px; border: 0; background: transparent; color: var(--plum); font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.dl-move button:disabled { color: var(--field); cursor: default; }
.dl-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; color: var(--muted); }
.dl-status a { color: var(--plum); font-weight: 700; }
.dl-items h2 small { color: var(--muted); font-size: 14px; font-weight: 600; }
.dl-parts, .dl-found { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dl-parts li, .dl-found li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); }
.dl-part { flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; font-weight: 700; overflow-wrap: anywhere; }
.dl-part a { color: var(--plum); }
.dl-part small { color: var(--muted); font-size: 13px; font-weight: 600; }
.dl-qty { flex: none; display: flex; align-items: center; gap: 8px; }
.dl-qty form { margin: 0; }
.dl-qty button { width: 40px; height: 40px; border: 2px solid var(--field); border-radius: 12px; background: var(--white); color: var(--plum); font: inherit; font-size: 20px; font-weight: 800; cursor: pointer; }
.dl-qty button:disabled { color: var(--field); cursor: default; }
.dl-found form { margin: 0; }
.dl-found .btn { min-height: 40px; padding: 0 14px; font-size: 15px; }
.dl-sum { margin: 0; padding: 10px 12px; border-radius: 12px; background: #dff3e7; color: #14532d; }
.dl-sum.is-bad { background: #fde3e1; color: #b3261e; }
@media (min-width: 720px) {
  .dl-main { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .dl-main .pd-thumb { grid-row: auto; }
  .dl-price { grid-column: 3; display: grid; justify-items: end; text-align: right; }
}
.dl-img { width: 160px; height: 160px; object-fit: contain; border: 1px solid var(--field); border-radius: 14px; background: #fff; }
