/* Файл хранит дизайн-систему сайта PackDeal: токены, типографику, шапку, ИИ-поиск, каталог, карточку товара, формы, окна,
   кабинеты и собственные полосы прокрутки. Шкала размеров и правила описаны в #reference/#UI_STYLE_TEMPLATES.md. */

/* ------------------------------------------------- ШРИФТ: Manrope лежит на сайте, без внешних запросов ------------------------------------------------- */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../$fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../$fonts/manrope-latin.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 {
  --bg: #FFFFFF;
  --bg-subtle: #F6F7F9;
  --bg-hover: #F2F4F7;
  --page-bg: #F4F6F5;
  --line: #E4E7EC;
  --line-strong: #CFD4DC;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --brand: #067647;
  --brand-hover: #05603A;
  --brand-soft: #ECFDF3;
  --brand-line: #ABEFC6;
  --brand-tint: #E3F6EA;
  --brand-ink: #054F31;
  --info: #175CD3;
  --info-soft: #EFF8FF;
  --warn: #B42318;
  --warn-soft: #FEF3F2;
  --hot: #E5484D;
  --hot-soft: #FFEFEF;
  /* шкала текста: подписи 13, основной 15, крупный 17, заголовки 20 / 24 / 30, первый экран 46 */
  --fs-xs: 13px;
  --fs-s: 14px;
  --fs-base: 15px;
  --fs-l: 17px;
  --fs-h3: 17px;
  --fs-h2: 24px;
  --fs-h1: 30px;
  --fs-display: 46px;
  /* скругления: поля и кнопки, карточки, крупные блоки */
  --radius-s: 12px;
  --radius: 18px;
  --radius-l: 28px;
  --shadow-s: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-m: 0 10px 28px rgba(16, 24, 40, .09);
  --shadow-l: 0 20px 48px rgba(16, 24, 40, .16);
  --header-h: 120px;
  --nav-h: 0px;
  --container: 1240px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* полосы прокрутки: значения приходят из PROJECT_SYSTEM_SETTINGS через /api/public-settings */
  --sb-page: 10px;
  --sb-compact: 6px;
  --sb-gap: 2px;
  --sb-track: transparent;
  --sb-thumb: rgba(16, 24, 40, .22);
  --sb-thumb-hover: rgba(16, 24, 40, .38);
  --sb-thumb-active: #067647;
  --sb-focus: #067647;
  --sb-radius: 6px;
}

/* ------------------------------------------------- ОСНОВА ------------------------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: var(--fs-base); line-height: 1.55; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.25; }
h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-s); }
.eyebrow { font-size: var(--fs-s); color: var(--muted); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ------------------------------------------------- ШАПКА ------------------------------------------------- */
.shell { height: 100%; display: flex; flex-direction: column; }
.topbar { flex: 0 0 auto; background: var(--bg); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.topbar-row { max-width: var(--container); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.topbar-main { height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; color: var(--text); }
.logo-mark { width: 32px; height: 32px; flex: 0 0 auto; }
.header-search { flex: 1 1 auto; max-width: 620px; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sell-link { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--fs-s); white-space: nowrap; transition: border-color .15s ease, background .15s ease; }
.sell-link svg { width: 18px; height: 18px; color: var(--brand); flex: 0 0 auto; }
.sell-link:hover, .sell-link.active { border-color: var(--brand); background: var(--brand-soft); }
.lang-toggle { height: 40px; min-width: 44px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: var(--fs-xs); font-weight: 700; color: var(--muted); cursor: pointer; }
.lang-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.icon-round { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); text-decoration: none; flex: 0 0 auto; }
.icon-round:hover { border-color: var(--line-strong); color: var(--text); }
.icon-round svg { width: 20px; height: 20px; }
.account-login { height: 40px; border-radius: 999px; padding: 0 18px; }
.badge-dot { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--hot); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.search-link { display: none; }
.topbar-nav { height: 48px; gap: 4px; }
.topnav { display: flex; gap: 2px; flex: 1; min-width: 0; height: 100%; }
.topnav a { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 12px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: var(--fs-base); white-space: nowrap; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--text); border-bottom-color: var(--brand); }
.topnav a svg { width: 20px; height: 20px; color: var(--brand); }
.topnav .topnav-my { margin-left: auto; }
.topbar-search-row { display: none; }
/* на главной поиск живёт в первом экране */
.is-home .topbar-main .header-search { visibility: hidden; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.hero h1 + p, .hero h1 + .sub { margin-top: 6px; }
.lang-switch { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.lang-switch button { border: 0; background: transparent; padding: 5px 10px; border-radius: 8px; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; color: var(--muted); }
.lang-switch button.active { background: var(--bg-subtle); color: var(--text); }
.page-host { flex: 1 1 auto; min-height: 0; background: var(--page-bg); }
.page { max-width: var(--container); margin: 0 auto; padding: 28px 24px 0; }
.page-narrow .page-inner { max-width: 760px; margin: 0 auto; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title .sub { color: var(--muted); margin-top: 6px; font-size: var(--fs-l); }
.breadcrumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: var(--fs-s); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.breadcrumbs > svg { width: 14px; height: 14px; flex: 0 0 auto; }

.footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 36px 24px 24px; display: grid; gap: 24px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer h4 { margin: 0 0 12px; font-size: var(--fs-s); font-weight: 700; color: var(--text); }
.footer a { display: block; color: var(--muted); text-decoration: none; font-size: var(--fs-s); padding: 4px 0; }
.footer a:hover { color: var(--text); }
.footer .about { color: var(--muted); font-size: var(--fs-s); max-width: 320px; margin-top: 12px; }
.footer-bottom { max-width: var(--container); margin: 0 auto; padding: 16px 24px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  color: var(--muted); font-size: var(--fs-xs); border-top: 1px solid var(--line); }
.footer-langs { display: inline-flex; gap: 14px; }
.footer-langs button { border: 0; background: none; padding: 0; font-size: var(--fs-xs); color: var(--muted); cursor: pointer; }
.footer-langs button.active { color: var(--text); font-weight: 700; }
.testmode { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--info); background: var(--info-soft); padding: 3px 10px; border-radius: 8px; }
.bottomnav { display: none; }

/* ------------------------------------------------- КНОПКИ И МЕТКИ ------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  height: 46px; padding: 0 20px; border-radius: var(--radius-s); font-weight: 700; font-size: var(--fs-base); background: var(--brand); color: #fff; transition: background .15s ease; }
.btn svg { width: 19px; height: 19px; flex: 0 0 auto; }
.btn:hover { background: var(--brand-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-accent { background: var(--brand); }
.btn-dark { background: var(--text); }
.btn-dark:hover { background: #1D2939; }
.btn-light { background: var(--bg); color: var(--text); border-color: var(--line-strong); }
.btn-light:hover { background: var(--bg-hover); }
.btn-white { background: #fff; color: var(--text); }
.btn-white:hover { background: var(--brand-soft); }
.btn-white svg { color: var(--brand); }
.btn-small { height: 38px; padding: 0 14px; font-size: var(--fs-s); }
.btn-block { width: 100%; }
.btn-lg { height: 54px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: var(--fs-base); }
.link-btn:hover { color: var(--text); }
.link-btn.danger { color: var(--warn); }
.text-action { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 0; color: var(--text-2); font-weight: 600; cursor: pointer; text-decoration: none; font-size: var(--fs-base); }
.text-action:hover { color: var(--brand); }
.text-action.on { color: var(--brand); }
.text-action svg { width: 19px; height: 19px; }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-note { color: var(--muted); font-size: var(--fs-s); }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: 12px; }
.stack-end { align-items: flex-end; text-align: right; }
.stack-center { align-items: center; text-align: center; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); }
.grid-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.two-col { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.two-col > .panel + .panel, .grid > .panel + .panel { margin-top: 0; }
.more-row { text-align: center; margin-top: 28px; }

.chip { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
  font-size: var(--fs-s); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--text-2); }
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.chip-soft { background: rgba(255, 255, 255, .75); border-color: rgba(6, 118, 71, .18); color: var(--brand-ink); }
.chip-soft:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px; font-size: var(--fs-xs); font-weight: 600; background: var(--bg-subtle); color: var(--text-2); white-space: nowrap; }
.tag svg { width: 14px; height: 14px; flex: 0 0 auto; }
.tag-accent, .tag-soft, .tag-ok { background: var(--brand-soft); color: var(--brand); }
.tag-b2b { background: var(--info-soft); color: var(--info); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-ad { background: rgba(255, 255, 255, .94); color: var(--muted); border: 1px solid var(--line); }
.tag-hot { background: var(--hot); color: #fff; font-weight: 700; }
.tag-photo { background: rgba(255, 255, 255, .95); color: var(--text); border: 1px solid var(--line); }

/* ------------------------------------------------- ИИ-ПОИСК ------------------------------------------------- */
.ai-search { display: flex; align-items: center; gap: 10px; height: 48px; padding-left: 14px; background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease; }
.ai-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(6, 118, 71, .12); }
.ai-search-icon { display: inline-flex; color: var(--brand); flex: 0 0 auto; }
.ai-search-icon svg { width: 20px; height: 20px; }
.ai-search input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: var(--fs-base); }
.ai-search input::placeholder { color: var(--muted); }
.ai-search .btn { height: 38px; width: 46px; padding: 0; margin-right: 4px; border-radius: 10px; flex: 0 0 auto; }
.ai-search-big { height: 66px; padding-left: 20px; border: 2px solid var(--brand); border-radius: 20px; box-shadow: 0 12px 32px rgba(6, 118, 71, .14); }
.ai-search-big .ai-search-icon svg { width: 24px; height: 24px; }
.ai-search-big input { font-size: 17px; }
.ai-search-big .btn { width: auto; height: 52px; padding: 0 26px; margin-right: 6px; border-radius: 14px; font-size: 16px; }
.ai-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ------------------------------------------------- ГЛАВНАЯ ------------------------------------------------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 32px 48px; align-items: center; background: var(--brand-tint); border-radius: var(--radius-l);
  padding: 52px 56px 0; margin-bottom: 32px; overflow: hidden; }
.hero-main h1 { font-size: var(--fs-display); line-height: 1.08; letter-spacing: -0.035em; font-weight: 800; }
.hero-main h1 span { display: block; color: var(--brand); }
.hero-sub { font-size: 18px; color: var(--text-2); margin: 16px 0 26px; max-width: 580px; }
.hero-side { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-live { display: inline-flex; align-items: center; gap: 10px; background: #fff; padding: 9px 16px; border-radius: 999px; font-size: var(--fs-s); font-weight: 700; box-shadow: var(--shadow-s); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #12B76A; flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(18, 183, 106, .18); }
.hero-trust { grid-column: 1 / -1; list-style: none; display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 8px -56px 0; padding: 20px 56px; background: rgba(255, 255, 255, .6); border-top: 1px solid rgba(6, 118, 71, .14); }
.hero-trust li { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-base); font-weight: 700; color: var(--text-2); }
.hero-trust svg { width: 20px; height: 20px; color: var(--brand); flex: 0 0 auto; }

.cats { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 96px; text-decoration: none; color: var(--text-2); font-size: var(--fs-s); font-weight: 600; text-align: center; line-height: 1.3; }
.cat-img { width: 78px; height: 78px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1px var(--line), var(--shadow-s); overflow: hidden; display: flex; align-items: center; justify-content: center;
  color: var(--brand); transition: transform .18s ease, box-shadow .18s ease; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-img svg { width: 30px; height: 30px; }
.cat:hover .cat-img { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--brand), var(--shadow-m); }
.cat:hover { color: var(--text); }

.feed-section { margin-top: 44px; }
.feed-section .section-head h2 { font-size: var(--fs-h2); }
.hot-title { display: inline-flex; align-items: center; gap: 10px; }
.hot-title svg { width: 24px; height: 24px; color: var(--hot); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { display: flex; gap: 16px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step-icon { position: relative; width: 52px; height: 52px; border-radius: 16px; background: var(--text); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.step-icon svg { width: 26px; height: 26px; }
.step-icon i { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-style: normal; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--page-bg); }
.step-text b { display: block; font-size: var(--fs-l); }
.step-text span { display: block; color: var(--muted); font-size: var(--fs-s); margin-top: 2px; }

/* продавцам: тёмная полоса */
.sell-band { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; background: #0B2A1D; color: #fff;
  border-radius: var(--radius-l); padding: 48px 56px; overflow: hidden; }
.band-kicker { display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-s); font-weight: 700; color: #75E0A7; background: rgba(255, 255, 255, .08); padding: 6px 12px; border-radius: 999px; }
.band-kicker svg { width: 17px; height: 17px; }
.sell-band h2 { font-size: 36px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; margin: 16px 0 20px; color: #fff; }
.band-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 12px; color: rgba(255, 255, 255, .86); font-size: var(--fs-l); }
.band-list li { display: flex; gap: 12px; align-items: center; }
.band-list svg { width: 20px; height: 20px; color: #75E0A7; flex: 0 0 auto; }
.sell-band-art, .sell-hero-art { display: flex; justify-content: center; }

/* живая пачка: цена и места видны сразу, движение только показывает механику */
.pack-demo { width: 100%; max-width: 380px; background: #fff; color: var(--text); border-radius: 22px; padding: 14px; box-shadow: var(--shadow-l); display: flex; gap: 16px; align-items: center; }
.pack-demo img { width: 108px; height: 108px; border-radius: 16px; object-fit: cover; flex: 0 0 auto; }
.pd-demo-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; padding: 4px 4px 4px 0; }
.pack-demo > .pd-demo-body:first-child { padding: 10px; }
.pd-demo-title { font-weight: 700; font-size: var(--fs-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-demo-price { display: flex; align-items: baseline; gap: 8px; }
.pd-demo-price b { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--brand); font-variant-numeric: tabular-nums; }
.pd-demo-price s { color: var(--muted); font-size: var(--fs-base); }
.pd-demo-seats { display: flex; gap: 4px; }
.pd-demo-seats i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); }
.pd-demo-seats i.on { background: var(--brand); }
.pd-demo-foot { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--muted); min-height: 22px; }
.pd-demo-foot span { white-space: nowrap; }
.pd-demo-done { display: none; align-items: center; gap: 4px; color: var(--brand); font-weight: 700; }
.pd-demo-done svg { width: 15px; height: 15px; }
.pack-demo.done .pd-demo-done { display: inline-flex; }

/* ------------------------------------------------- ИИ-ПОДБОР ------------------------------------------------- */
.ai-head h1 { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ai-head h1 svg { width: 30px; height: 30px; color: var(--brand); }
.ai-intro { font-size: var(--fs-l); color: var(--text-2); margin: 20px 0 4px; }
.ai-answer { display: flex; gap: 14px; align-items: flex-start; background: var(--bg); border: 1px solid var(--brand-line); border-radius: var(--radius); padding: 18px 20px; margin: 24px 0 16px; box-shadow: var(--shadow-s); }
.ai-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ai-avatar svg { width: 22px; height: 22px; }
.ai-answer-text { padding-top: 8px; font-size: 16px; line-height: 1.55; }
.ai-answer-text b { font-weight: 700; }
.typing-dots { display: inline-flex; gap: 5px; margin-left: 10px; vertical-align: middle; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: blink 1s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
.ai-refine { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.ai-empty { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; }
.ai-more { display: flex; align-items: center; gap: 12px; width: fit-content; margin: 32px auto 0; padding: 14px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg);
  font-size: var(--fs-base); font-weight: 700; color: var(--text); text-decoration: none; }
.ai-more svg { width: 20px; height: 20px; color: var(--brand); }
.ai-more:hover { border-color: var(--brand); }
.skeleton { background: linear-gradient(90deg, #EEF1F4 0, #F7F8FA 50%, #EEF1F4 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-card { overflow: hidden; }
.sk-media { aspect-ratio: 1 / 1; border-radius: 0; }
.sk-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sk-line { height: 18px; }
.sk-line.short { width: 60%; }
.sk-btn { height: 46px; border-radius: var(--radius-s); margin-top: 6px; }

/* ------------------------------------------------- КАРТОЧКА В КАТАЛОГЕ ------------------------------------------------- */
.product-card { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; position: relative; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.product-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-m); }
.product-card .media { display: block; aspect-ratio: 1 / 1; background: var(--bg-subtle); position: relative; overflow: hidden; }
.product-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .media img { transform: scale(1.04); }
.product-card .media .tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.product-card .media .feats { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.discount-badge { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; height: 28px; padding: 0 9px; border-radius: 8px; background: var(--brand); color: #fff; font-size: var(--fs-s); font-weight: 800; }
.product-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.price-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; color: var(--text); }
.strike { text-decoration: line-through; color: var(--muted); font-size: var(--fs-s); }
.saving { font-weight: 700; color: var(--brand); font-size: var(--fs-s); }
.product-card .title { text-decoration: none; font-weight: 600; font-size: var(--fs-base); line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.card-reason { display: flex; gap: 8px; align-items: flex-start; background: var(--brand-soft); color: var(--brand-ink); border-radius: 10px; padding: 9px 11px; font-size: var(--fs-s); line-height: 1.45; }
.card-reason svg { width: 17px; height: 17px; color: var(--brand); flex: 0 0 auto; margin-top: 2px; }
.card-reason span { min-width: 0; overflow-wrap: anywhere; }
.card-foot { margin-top: auto; padding-top: 2px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); }
.timer { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timer svg { width: 14px; height: 14px; }
.is-hot .timer { color: var(--hot); font-weight: 700; }
.product-card.is-hot { border-color: #FECDCA; }
.seats { display: flex; gap: 3px; }
.seats i { flex: 1; height: 7px; border-radius: 4px; background: var(--line); }
.seats i.on { background: var(--brand); }
.seats i.you { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.progress-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress-bar > i { display: block; height: 100%; background: var(--brand); }
.progress-label { font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }
.progress-label b { color: var(--text-2); font-weight: 700; }
.almost { color: var(--brand); font-weight: 700; }
.btn-card { width: 100%; height: 44px; margin-top: 8px; font-size: var(--fs-base); }
.btn-in { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.btn-in:hover { background: #DCFAE6; }

/* ------------------------------------------------- СТРАНИЦА ТОВАРА ------------------------------------------------- */
.product-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr); grid-template-areas: "media buy" "details buy"; align-items: start; }
.pl-media { grid-area: media; }
.pl-buy { grid-area: buy; align-self: start; position: sticky; top: 16px; }
.pl-details { grid-area: details; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pl-details .panel + .panel { margin-top: 0; }
.product-media { border-radius: var(--radius); overflow: hidden; background: var(--bg-subtle); aspect-ratio: 1 / 1; border: 1px solid var(--line); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.buy-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--bg); }
.buy-box h1 { font-size: 26px; }
.buy-box .meta { color: var(--muted); font-size: var(--fs-s); margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.buy-box .divider { height: 1px; background: var(--line); margin: 20px 0; }
.price-big { font-size: 38px; font-weight: 800; letter-spacing: -0.025em; }
.price-accent { color: var(--text); }
.price-caption { font-size: var(--fs-xs); color: var(--muted); }
.tiers-caption { font-size: var(--fs-xs); color: var(--muted); margin: 16px 0 8px; }
.tiers { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.tier { text-align: center; padding: 10px 4px; border-left: 1px solid var(--line); }
.tier:first-child { border-left: 0; }
.tier .q { font-size: var(--fs-xs); color: var(--muted); }
.tier .p { font-weight: 700; font-size: 16px; }
.tier.active { background: var(--brand-soft); box-shadow: inset 0 -2px 0 var(--brand); }
.tier.active .p { color: var(--brand); }
.rating { display: inline-flex; align-items: center; gap: 3px; color: var(--text); font-weight: 700; }
.rating svg { width: 15px; height: 15px; color: #F5A524; }
.people { display: flex; align-items: center; }
.people .person { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -6px; background: #EAECF0; color: var(--muted); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.people .person:first-child { margin-left: 0; }
.people .person svg { width: 24px; height: 24px; }
.people .person-profile { width: 60px; height: 60px; }
.people .person-profile svg { width: 50px; height: 50px; }
.people .person.free { border: 1.5px dashed var(--line-strong); background: var(--bg); }
.pack-box { margin-top: 16px; background: var(--page-bg); border-radius: 14px; padding: 16px; }
.pack-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: var(--fs-base); }
.pack-head .timer { color: var(--hot); font-weight: 700; font-size: var(--fs-xs); background: var(--bg); padding: 4px 10px; border-radius: 999px; }
.seat-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.seat { width: 36px; height: 36px; border-radius: 50%; border: 1.5px dashed var(--line-strong); background: var(--bg); display: inline-flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.seat.on { border: 0; background: var(--brand-soft); color: var(--brand); }
.seat.on svg { width: 32px; height: 32px; opacity: .75; }
.seat.you { border: 1.5px dashed var(--brand); align-items: center; color: var(--brand); }
.seat.you svg { width: 16px; height: 16px; }
.seat-more { font-size: var(--fs-s); color: var(--muted); font-weight: 700; margin-left: 2px; }
.pack-hint { margin-top: 10px; font-size: var(--fs-s); color: var(--text-2); }
.pack-hint b { color: var(--brand); }
.in-pack { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 14px; padding: 14px 16px; }
.in-pack > svg { width: 20px; height: 20px; color: var(--brand); flex: 0 0 auto; margin-top: 2px; }
.in-pack b { display: block; color: var(--brand); }
.in-pack span span { display: block; font-size: var(--fs-s); color: var(--text-2); margin-top: 2px; }
.cta-block { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.cta-block .link-btn { align-self: center; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-s); color: var(--text-2); }
.trust li { display: flex; gap: 8px; align-items: flex-start; }
.trust svg { width: 16px; height: 16px; color: var(--brand); flex: 0 0 auto; margin-top: 3px; }
.trust-line { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: var(--fs-xs); color: var(--muted); }
.trust-line > svg { width: 16px; height: 16px; color: var(--brand); flex: 0 0 auto; }
.haggle-cta { display: flex; width: 100%; gap: 12px; align-items: center; text-align: left; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--brand-line); border-radius: 14px;
  background: var(--brand-soft); cursor: pointer; font: inherit; color: inherit; transition: border-color .15s ease; }
.haggle-cta:hover { border-color: var(--brand); }
.haggle-cta .feature-icon { background: var(--bg); }
.haggle-cta b { display: block; color: var(--brand); font-size: var(--fs-base); font-weight: 700; }
.haggle-cta span span { display: block; font-size: var(--fs-xs); color: var(--text-2); margin-top: 1px; }
.buy-actions { margin-top: 12px; gap: 6px 22px; }
.info-btn { width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 0; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.info-btn svg { width: 19px; height: 19px; }
.info-btn:hover { color: var(--text); }
.info-pop { background: var(--text); color: #fff; border-radius: var(--radius-s); padding: 11px 13px; font-size: var(--fs-s); margin-top: 8px; font-weight: 400; line-height: 1.5; }
.savings-card { padding: 22px; }
.savings-total { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.savings-total b { font-size: 19px; color: var(--brand); }
.savings-big { font-size: 28px; font-weight: 800; color: var(--brand); letter-spacing: -0.02em; }
.legend { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: var(--fs-s); }
.legend div { display: flex; justify-content: space-between; }
.legend i { display: inline-block; width: 14px; height: 2px; margin-right: 8px; vertical-align: middle; background: var(--text); }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--brand) 0 5px, transparent 5px 8px); }
.legend-row { flex-direction: row; flex-wrap: wrap; gap: 8px 22px; color: var(--text-2); }
.legend-row span { display: inline-flex; align-items: center; gap: 4px; }
.legend-row i { margin-right: 4px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.spec-table td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table td:first-child { color: var(--muted); width: 45%; }
.sellers { display: flex; flex-direction: column; }
.seller { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.seller:last-child { border-bottom: 0; }
.seller img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.seller .grow { flex: 1; min-width: 0; }
.feature { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; background: var(--bg); transition: border-color .15s ease; }
.feature:hover { border-color: var(--brand); }
.feature-wide { margin-bottom: 20px; align-items: center; }
.feature-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.feature-icon svg { width: 21px; height: 21px; }
.feature b { display: block; font-size: var(--fs-base); font-weight: 700; color: var(--text); }
.feature span span { display: block; font-size: var(--fs-s); line-height: 1.45; color: var(--muted); margin-top: 2px; }
.demand-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.my-pack { margin-top: 8px; max-width: 360px; }

/* ------------------------------------------------- СПИСКИ И ФОРМЫ ------------------------------------------------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item img.thumb { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: var(--bg-subtle); border: 1px solid var(--line); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; color: var(--text); }
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); overflow: hidden; }
.tabs .chip { border: 0; border-radius: 0; height: 44px; padding: 0 14px; background: none; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: var(--fs-base); }
.tabs .chip:hover { color: var(--text); }
.tabs .chip.active { background: none; color: var(--text); border-bottom-color: var(--brand); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: var(--fs-s); font-weight: 600; color: var(--text-2); }
.field input:not([type=radio]):not([type=checkbox]):not([type=file]), .field textarea, .pd-select-button {
  height: 46px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--bg); padding: 0 14px; width: 100%; font-size: var(--fs-base); }
.field textarea { height: 104px; padding: 11px 14px; resize: vertical; }
.field input:not([type=radio]):not([type=checkbox]):focus, .field textarea:focus, .pd-select-button:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field input[type=file] { font-size: var(--fs-s); color: var(--muted); }
.field input[type=file]::file-selector-button { height: 38px; padding: 0 14px; margin-right: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--bg); color: var(--text); font: inherit; font-size: var(--fs-s); font-weight: 700; cursor: pointer; }
.field-error { color: var(--warn); font-size: var(--fs-s); }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-base); cursor: pointer; color: var(--text-2); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 auto; }
.radio-cards { display: grid; gap: 8px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.radio-card input { margin-top: 3px; accent-color: var(--brand); }
.radio-card.active { border-color: var(--brand); background: var(--brand-soft); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; }
.stepper button { width: 42px; height: 42px; border: 0; background: var(--bg); cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; }
.stepper button svg { width: 18px; height: 18px; }
.stepper button:hover { background: var(--bg-hover); }
.stepper span { min-width: 38px; text-align: center; font-weight: 700; }
.sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.sizes button { min-width: 46px; height: 42px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--bg); font-weight: 600; cursor: pointer; }
.sizes button.active { border-color: var(--text); background: var(--text); color: #fff; }
.sizes button.need { border-color: var(--brand); }
.tier-editor { display: flex; flex-direction: column; gap: 8px; }
.tier-editor .tier-row, .kv-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.tier-editor input, .kv-row input { height: 44px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); padding: 0 12px; width: 100%; }
.tier-editor + .link-btn { align-self: flex-start; font-size: var(--fs-s); }
.icon-btn { width: 38px; height: 38px; border-radius: var(--radius-s); border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.input-s { height: 38px; width: 160px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); padding: 0 12px; background: var(--bg); }
.input-s:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg); }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.stat .l { font-size: var(--fs-s); color: var(--muted); margin-top: 2px; }
.big-number { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--brand); }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 19px; }
.notice { padding: 13px 15px; border-radius: var(--radius-s); background: var(--bg-subtle); border: 1px solid var(--line); font-size: var(--fs-s); color: var(--text-2); }
.notice-dark { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); font-weight: 600; }

/* ------------------------------------------------- ФОРМА ТОВАРА ПРОДАВЦА ------------------------------------------------- */
.product-top { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.product-top-fields { display: flex; flex-direction: column; gap: 14px; }
.photo-drop { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border: 1.5px dashed var(--line-strong); border-radius: 16px;
  background: var(--bg-subtle); cursor: pointer; overflow: hidden; text-align: center; transition: border-color .15s ease, background .15s ease; }
.photo-drop:hover, .photo-drop:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-drop.has-photo { border-style: solid; }
.photo-drop.has-photo .photo-empty { display: none; }
.photo-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; color: var(--muted); font-size: var(--fs-xs); pointer-events: none; }
.photo-empty svg { width: 30px; height: 30px; color: var(--brand); }
.photo-empty b { color: var(--text); font-size: var(--fs-s); }
.ai-fill { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--brand-line); background: var(--brand-soft);
  color: var(--brand); font-size: var(--fs-s); font-weight: 700; cursor: pointer; }
.ai-fill svg { width: 16px; height: 16px; }
.ai-fill:hover { border-color: var(--brand); }
.ai-fill.busy { opacity: .7; cursor: progress; }
.price-box { background: var(--page-bg); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.price-hint { font-size: var(--fs-s); color: var(--muted); }
.price-hint.good { color: var(--brand); font-weight: 700; }
.price-hint.bad { color: var(--warn); font-weight: 700; }
.more-box { border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.more-box summary { cursor: pointer; padding: 14px 0; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-base); }
.more-box summary::-webkit-details-marker { display: none; }
.more-box summary .small { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.more-box summary > svg { width: 18px; height: 18px; margin-left: auto; color: var(--muted); transition: transform .15s ease; flex: 0 0 auto; }
.more-box[open] summary > svg { transform: rotate(180deg); }
.more-body { padding-bottom: 16px; }

/* ------------------------------------------------- СТРАНИЦА ПРОДАВЦА ------------------------------------------------- */
.sell-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: center; background: var(--brand-tint); border-radius: var(--radius-l); padding: 48px 56px; }
.sell-hero h1 { font-size: 44px; line-height: 1.08; letter-spacing: -0.035em; font-weight: 800; margin-top: 16px; }
.sell-hero p { font-size: 18px; color: var(--text-2); margin: 14px 0 26px; max-width: 540px; }
.sell-hero-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.sell-hero .pack-demo { box-shadow: 0 18px 44px rgba(6, 118, 71, .18); }
.banner-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-s); font-weight: 700; color: var(--brand); background: rgba(255, 255, 255, .75); padding: 6px 12px; border-radius: 999px; }
.banner-kicker svg { width: 17px; height: 17px; }
.sell-hero + .feed-section { margin-top: 40px; }
.sell-form { max-width: 660px; margin: 0 auto; padding: 30px; }
.sell-form h2 { font-size: var(--fs-h2); }
.sell-form > p { margin: 6px 0 20px; }
.sell-form .btn { align-self: flex-start; }
.sell-final { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px; }
.sell-final p { margin-top: 4px; }
.pains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pain { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.pain-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.pain-icon svg { width: 23px; height: 23px; }
.pain-old { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-s); color: var(--muted); }
.pain-old svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 3px; color: var(--hot); }
.pain-old span { text-decoration: line-through; text-decoration-color: rgba(229, 72, 77, .55); }
.pain-new { font-size: var(--fs-l); font-weight: 700; line-height: 1.4; color: var(--text); }

/* ------------------------------------------------- ЧАТЫ ------------------------------------------------- */
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 11px 15px; border-radius: 14px; font-size: var(--fs-base); white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: var(--text); color: #fff; border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: var(--bg-subtle); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--brand-soft); border: 1px solid var(--brand-line); border-bottom-left-radius: 4px; }
.bubble.vendor { align-self: flex-end; background: var(--bg-subtle); border: 1px solid var(--line); border-bottom-right-radius: 4px; }
.bubble .who { display: block; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.bubble.result { align-self: stretch; max-width: none; background: var(--brand); color: #fff; font-weight: 700; text-align: center; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--bg-subtle); border-radius: 12px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.chat-box { display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - var(--nav-h) - 170px); min-height: 420px; }
.chat-scroll { flex: 1 1 auto; min-height: 0; }
.chat-scroll .chat { padding: 18px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; height: 46px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); padding: 0 14px; background: var(--bg); }
.chat-input input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chat a { color: inherit; font-weight: 700; }
.chat-hints { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }
.chat-hints .chip { cursor: pointer; background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.chat-hints .chip:hover { border-color: var(--brand); }
.brag { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; text-align: center; background: var(--bg); }
.brag .num { font-size: 64px; font-weight: 800; color: var(--brand); letter-spacing: -0.03em; line-height: 1; }
.brag img { width: 160px; height: 160px; border-radius: 14px; margin: 0 auto 18px; object-fit: cover; }
.brag-prices { display: flex; align-items: center; justify-content: center; gap: 8px; opacity: .75; }
.brag-prices svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ------------------------------------------------- ОКНА И СООБЩЕНИЯ ------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--bg); border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-l); }
.modal-wide { max-width: 620px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 19px; }
.modal-body { flex: 1 1 auto; min-height: 0; }
.modal-inner { padding: 22px; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: #fff; padding: 12px 18px; border-radius: var(--radius-s); font-size: var(--fs-base); box-shadow: var(--shadow-m); width: max-content; max-width: min(92vw, 460px); text-align: center; }
.toast.error { background: var(--warn); }
.join-form { gap: 14px; }
.join-head { display: flex; gap: 12px; align-items: center; }
.join-head img { width: 68px; height: 68px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); flex: 0 0 auto; }
.join-title { font-weight: 700; font-size: var(--fs-l); line-height: 1.3; }
.join-head .price { font-size: 22px; }
.join-more { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
.join-more summary { cursor: pointer; padding: 13px 0; font-size: var(--fs-base); color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 4px; }
.join-more summary::-webkit-details-marker { display: none; }
.join-more summary > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); margin-left: auto; transition: transform .15s ease; }
.join-more[open] summary > svg { transform: rotate(180deg); }
.join-more[open] { padding-bottom: 12px; }
.join-more b { color: var(--text); }
.join-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.join-note svg { width: 15px; height: 15px; color: var(--brand); flex: 0 0 auto; }
.join-done { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 8px; }
.join-done .link-btn { margin-top: 2px; }
.done-badge { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.done-badge svg { width: 32px; height: 32px; stroke-width: 2.4; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confetti { position: absolute; inset: -24px 0 auto; height: 220px; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 7px; height: 12px; border-radius: 2px; opacity: 0; animation: confetti 1.6s ease-out forwards; }
@keyframes confetti { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(210px) rotate(540deg); } }

/* ------------------------------------------------- СОБСТВЕННЫЙ SELECT ------------------------------------------------- */
.pd-select { position: relative; }
.pd-select-button { text-align: left; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.pd-select-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-select-button > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); margin-left: 8px; transition: transform .15s ease; }
.pd-select-button[aria-expanded="true"] > svg { transform: rotate(180deg); }
.pd-select-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow-m); max-height: 260px; }
.pd-select-option { padding: 10px 14px; cursor: pointer; }
.pd-select-option[aria-selected="true"] { color: var(--brand); font-weight: 600; }
.pd-select-option.focus, .pd-select-option:hover { background: var(--bg-hover); }

/* ------------------------------------------------- ПОЛОСЫ ПРОКРУТКИ ------------------------------------------------- */
.sb-host { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sb-viewport { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: none; -ms-overflow-style: none; outline: none; }
.sb-viewport::-webkit-scrollbar { display: none; width: 0; height: 0; }
.sb-self { scrollbar-width: none; -ms-overflow-style: none; }
.sb-self::-webkit-scrollbar { display: none; width: 0; height: 0; }
.sb-wrap { position: relative; display: block; }
.sb-static { position: relative; }
.sb-track { position: absolute; background: var(--sb-track); border-radius: var(--sb-radius); z-index: 5; touch-action: none; }
.sb-track.y { top: var(--sb-gap); right: var(--sb-gap); }
.sb-track.x { left: var(--sb-gap); bottom: var(--sb-gap); }
.sb-thumb { position: absolute; background: var(--sb-thumb); border-radius: var(--sb-radius); cursor: pointer; outline: none; }
.sb-track.y .sb-thumb { left: 0; right: 0; }
.sb-track.x .sb-thumb { top: 0; bottom: 0; }
.sb-thumb:hover { background: var(--sb-thumb-hover); }
.sb-thumb.dragging { background: var(--sb-thumb-active); }
.sb-thumb:focus-visible { box-shadow: 0 0 0 2px var(--sb-focus); }
.sb-track.off { display: none; }

/* подвал прижат к низу на коротких страницах */
#page-host > .sb-viewport { display: flex; flex-direction: column; }
#page-host > .sb-viewport > .page { flex: 1 0 auto; width: 100%; }
#page-host > .sb-viewport > .footer { flex: 0 0 auto; }

/* ------------------------------------------------- ПЛАНШЕТ ------------------------------------------------- */
@media (max-width: 1100px) {
  .grid-row { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .home-hero { grid-template-columns: 1fr; padding: 40px 40px 0; }
  .hero-side { display: none; }
  .hero-trust { margin: 0 -40px; padding: 18px 40px; }
}
@media (max-width: 1000px) {
  .product-layout { grid-template-columns: 1fr; grid-template-areas: "media" "buy" "details"; }
  .pl-buy { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .pains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .sell-band, .sell-hero { grid-template-columns: 1fr; padding: 36px; }
  .sell-link span { display: none; }
  .sell-link { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 1000px) and (min-width: 761px) { .product-media { aspect-ratio: 4 / 3; max-height: 480px; } }

/* ------------------------------------------------- ТЕЛЕФОН: крупно и в один палец ------------------------------------------------- */
@media (max-width: 760px) {
  :root { --header-h: 60px; --nav-h: 66px; --fs-h1: 26px; --fs-h2: 21px; }
  .topbar-row { padding: 0 16px; gap: 10px; }
  .topbar-main { height: 60px; }
  .logo { font-size: 19px; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
  .topbar-main .header-search, .topbar-nav, .topbar-search-row, .lang-toggle { display: none; }
  .search-link { display: inline-flex; }
  .topbar-right { gap: 8px; }
  .sell-link, .icon-round { width: 42px; height: 42px; }
  .account-login { height: 42px; padding: 0 16px; font-size: var(--fs-base); }
  .page { padding: 18px 16px 0; }
  .page-title .sub { font-size: var(--fs-base); }
  .field input:not([type=radio]):not([type=checkbox]):not([type=file]), .field textarea, .pd-select-button, .ai-search input, .chat-input input { font-size: 16px; }

  .home-hero { padding: 26px 20px 0; border-radius: 22px; margin-bottom: 26px; gap: 0; }
  .hero-main h1 { font-size: 31px; line-height: 1.12; }
  .hero-sub { font-size: 16px; margin: 12px 0 18px; }
  .ai-search-big { height: auto; flex-wrap: wrap; padding: 6px; gap: 6px; border-radius: 18px; }
  .ai-search-big .ai-search-icon { margin-left: 10px; }
  .ai-search-big input { flex: 1 1 calc(100% - 50px); height: 48px; font-size: 16px; }
  .ai-search-big .btn { width: 100%; margin: 0; height: 50px; }
  .ai-examples { gap: 8px; margin-top: 14px; }
  .ai-examples .chip { height: 38px; font-size: var(--fs-s); }
  .hero-trust { flex-direction: column; gap: 10px; margin: 22px -20px 0; padding: 16px 20px; }
  .hero-trust li { font-size: var(--fs-base); }

  .cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; }
  .cat { width: auto; font-size: var(--fs-xs); gap: 8px; }
  .cat-img { width: 66px; height: 66px; }
  .feed-section { margin-top: 34px; }
  .section-head { flex-wrap: wrap; gap: 4px 12px; }
  .grid, .grid-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card { border-radius: 16px; }
  .product-card .body { padding: 12px; gap: 6px; }
  .price { font-size: 20px; }
  .strike { font-size: var(--fs-xs); }
  .product-card .title { font-size: var(--fs-s); min-height: 38px; }
  .card-reason { font-size: var(--fs-xs); padding: 8px 9px; }
  .card-meta { font-size: var(--fs-xs); }
  .discount-badge { height: 26px; font-size: var(--fs-xs); right: 8px; top: 8px; }
  .product-card .media .feats { left: 8px; right: 8px; bottom: 8px; }
  .tag { height: 24px; font-size: 12.5px; }
  .btn-card { height: 42px; font-size: var(--fs-s); padding: 0 8px; }

  .ai-head h1 { font-size: 24px; }
  .ai-answer { padding: 14px; gap: 12px; }
  .ai-answer-text { font-size: var(--fs-base); padding-top: 6px; }
  .ai-avatar { width: 38px; height: 38px; }
  .ai-empty .btn { flex: 1 1 100%; }

  .steps { gap: 10px; }
  .step { padding: 16px; }
  .sell-band, .sell-hero { padding: 26px 20px; border-radius: 22px; gap: 24px; }
  .sell-band h2 { font-size: 27px; }
  .band-list { font-size: var(--fs-base); }
  .sell-hero h1 { font-size: 31px; }
  .sell-hero p { font-size: 16px; margin: 10px 0 18px; }
  .pack-demo img { width: 86px; height: 86px; }
  .pd-demo-price b { font-size: 26px; }
  .pains { grid-template-columns: 1fr; gap: 10px; }
  .pain { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: start; padding: 16px; }
  .pain-icon { grid-row: span 2; }
  .pain-new { font-size: var(--fs-base); }
  .sell-form, .sell-final { padding: 22px 18px; }

  .two-col { grid-template-columns: 1fr; gap: 16px; }
  .buy-box { padding: 0; border: 0; background: transparent; }
  .buy-box h1 { font-size: 23px; }
  .price-big { font-size: 32px; }
  .product-top { grid-template-columns: 1fr; }
  .photo-drop { aspect-ratio: auto; height: 150px; }
  .price-grid { grid-template-columns: 1fr 1fr; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; }
  .modal-wide { max-width: none; }
  .footer-inner { grid-template-columns: 1fr; padding: 28px 16px; }
  .footer-bottom { padding: 16px 16px 22px; }
  .bottomnav { display: flex; height: var(--nav-h); flex: 0 0 auto; border-top: 1px solid var(--line); background: var(--bg); justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 8px 4px; }
  .bottomnav a.active { color: var(--brand); }
  .bottomnav svg { width: 25px; height: 25px; }
  .seat-row { gap: 5px; }
  .seat { width: 30px; height: 30px; }
  .seat.on svg { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .product-card, .product-card .media img, .cat-img, .btn { transition: none; }
  .skeleton, .typing-dots i, .typing i { animation: none; }
}

/* ------------------------------------------------- ДОПОЛНЕНИЯ: ИИ-ВЫДАЧА И РАЗДЕЛЫ НА ТЕЛЕФОНЕ ------------------------------------------------- */
.ai-head-compact { max-width: 760px; }
.ai-head-compact .ai-search { height: 54px; border-width: 2px; border-color: var(--brand); }
.ai-head-compact .ai-search .btn { height: 44px; width: 52px; }
.ai-refine { align-items: center; margin: 28px 0 0; }
.ai-refine-label { font-size: var(--fs-s); font-weight: 700; color: var(--muted); margin-right: 4px; }
.home-links { display: none; }
@media (max-width: 760px) {
  .home-hero .hero-main h1 { font-size: 29px; }
  .hero-sub { font-size: 15px; }
  .ai-examples .chip { height: 36px; padding: 0 12px; }
  .hero-trust { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .hero-trust li { font-size: var(--fs-s); gap: 6px; }
  .hero-trust svg { width: 17px; height: 17px; }
  .home-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
  .home-links a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
    text-decoration: none; color: var(--text); font-size: var(--fs-xs); font-weight: 700; text-align: center; }
  .home-links svg { width: 24px; height: 24px; color: var(--brand); }
  .cat-img { width: 62px; height: 62px; }
  .ai-answer-text { font-size: var(--fs-base); line-height: 1.5; }
  .ai-head-compact .ai-search { height: 52px; }
}

/* ИИ-выдача на телефоне: одна колонка, фото слева, пояснение ИИ читается целиком */
@media (max-width: 760px) {
  .ai-grid { grid-template-columns: 1fr; gap: 12px; }
  .ai-grid .product-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: stretch; }
  .ai-grid .product-card .media { aspect-ratio: auto; height: 100%; min-height: 150px; }
  .ai-grid .product-card .media .feats { display: none; }
  .ai-grid .product-card .title { min-height: 0; }
}

/* строки списков на телефоне: фото и текст первой строкой, действия - под ними во всю ширину */
@media (max-width: 760px) {
  .list-item { flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; }
  .list-item .grow { flex: 1 1 calc(100% - 80px); }
  .list-item > .stack-end, .list-item > form, .list-item > .row { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; gap: 8px 16px; }
  .list-item > .stack-end > * + * { margin-top: 0; }
  .list-item > form .input-s { flex: 1 1 auto; width: auto; }
  .list-item .title { font-size: var(--fs-base); }
}

/* вкладки кабинетов на телефоне: таблетки с переносом, ни одна вкладка не обрезается */
@media (max-width: 760px) {
  .tabs { flex-wrap: wrap; gap: 8px; border-bottom: 0; overflow: visible; }
  .tabs .chip { height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; margin: 0; background: var(--bg); font-size: var(--fs-s); }
  .tabs .chip.active { background: var(--text); color: #fff; border-color: var(--text); }
}
