/* Витрина и кабинет. Дизайн-система проекта OPT: Inter, синяя гамма, карточки на светлом фоне. Mobile-first. */

/* ===== Шрифт: свой сервер, только нужные наборы символов ===== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url(/assets/fonts/inter-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url(/assets/fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url(/assets/fonts/inter-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; }
/* Запасной шрифт с метриками Inter — при подмене шрифта разметка не прыгает */
@font-face { font-family: "Inter Fallback"; src: local("Arial"); ascent-override: 90.44%; descent-override: 22.52%; line-gap-override: 0%; size-adjust: 107.12%; }

/* ===== Токены ===== */
:root {
    color-scheme: light;
    --bg: #f4f6fa;
    --surface: #fff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --line: #e3e8ef;
    --line-2: #cfd7e3;
    --primary: #1d4ed8;
    --primary-h: #1e3a8a;
    --primary-50: #eef3ff;
    --primary-100: #dbe5ff;
    --navy: #0f1f4d;
    --accent: #c2410c;
    --accent-bg: #fff4ea;
    --accent-line: #fed7aa;
    --ok: #15803d;
    --ok-bg: #ecfdf3;
    --warn: #b45309;
    --warn-bg: #fffbeb;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
    --shadow-lg: 0 20px 50px -20px rgba(15, 23, 42, .35);
    --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --container: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-h); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(29, 78, 216, .35); outline-offset: 2px; border-radius: 6px; }

.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 520px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 16px; color: var(--text-2); margin: 0 0 18px; max-width: 75ch; }
.good { color: var(--ok); font-weight: 600; }

/* ===== Кнопки ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
    border: 1px solid transparent; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .05s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary, .btn-primary { background: var(--primary); color: #fff; }
.btn--primary:hover, .btn-primary:hover { background: var(--primary-h); color: #fff; }
.btn--ghost, .btn:not(.btn--primary):not(.btn-primary):not(.btn--accent):not(.btn--link) { border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--accent { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-line); }
.btn--accent:hover { background: #ffe8d4; color: #9a3412; }
.btn--link { background: none; color: var(--muted); padding: 0; min-height: 0; font-weight: 500; }
.btn--lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn--sm, .btn-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn--block, .btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-done { background: var(--ok); color: #fff; }
/* Позиция уже в корзине: зелёная ссылка на корзину вместо «В корзину» */
.btn--incart { background: var(--ok-bg); color: var(--ok); border-color: #bbe5c8; }
.btn--incart:hover { background: #dcf7e6; color: var(--ok); }
.iconbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.iconbtn:hover { background: var(--danger-bg); color: var(--danger); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-align: left; }

/* ===== Верхняя полоса и шапка ===== */
.topbar { background: var(--navy); color: #c7d2fe; font-size: 13px; }
.topbar__in { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; }
.topbar a { color: #e0e7ff; }
.topbar a:hover, .topbar a.is-active { color: #fff; }
.topbar__links { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar__contacts { display: flex; gap: 18px; align-items: center; }
.topbar__contacts span, .topbar__contacts a { display: inline-flex; align-items: center; }
.topbar__contacts .ic { width: 15px; height: 15px; margin-right: 6px; opacity: .8; }
.topbar__contacts a { font-weight: 600; }
.topbar__max { gap: 0; padding: 3px 10px 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); transition: background .15s; }
.topbar__max:hover { background: rgba(255, 255, 255, .18); }
.topbar__contacts .topbar__max .ic { opacity: 1; color: #a5b4fc; }

.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header__in { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.logo:hover { color: var(--text); }
.logo__mark { color: var(--primary-h); display: flex; }
.logo__mark .ic { width: 40px; height: 40px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__text b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
/* Первая буква названия — жёлтая, как точка в значке */
.logo__first { color: #fbbf24; -webkit-text-stroke: .4px #d99a06; }
.logo--light .logo__first { -webkit-text-stroke: 0; }
/* Разделы в верхней полосе: Аренда · Услуги · Товары */
.topbar__sections { gap: 4px; margin-left: -12px; } /* текст первой ссылки — по краю контейнера, как логотип */
.topbar__sections a { padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.topbar__sections a:hover { background: rgba(255, 255, 255, .08); }
.topbar__sections a.is-active { background: rgba(255, 255, 255, .14); color: #fff; }
.logo__text small { color: var(--muted); font-size: 12px; }
.logo--light, .logo--light:hover, .logo--light .logo__text small { color: #fff; }
.logo--light .logo__mark { color: #3b5bdb; }
.catalog-btn { min-height: 46px; padding: 0 18px; }
/* Поиск в шапке (как в OPT): поле во всю ширину между «Каталогом» и кнопками, подсказки выпадают под ним */
.search { position: relative; flex: 1; display: flex; min-width: 0; }
.search input { width: 100%; height: 46px; padding: 0 52px 0 16px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface-2); outline: none; transition: border-color .15s, background .15s; }
.search input:focus { border-color: var(--primary); background: #fff; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search button { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; border-radius: 9px; background: var(--primary); color: #fff; cursor: pointer; display: grid; place-items: center; }
.search button:hover { background: var(--primary-h); }
.search button .ic { width: 18px; height: 18px; }
.search--page { max-width: 640px; margin: 0 0 24px; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 50; }
.suggest a { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; color: var(--text); }
.suggest a:hover, .suggest a.is-active { background: var(--primary-50); color: var(--text); }
.suggest__img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; color: var(--line-2); }
.suggest__img .ic { width: 22px; height: 22px; }
.suggest__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.suggest small { color: var(--muted); display: block; font-size: 12px; }
.suggest__price { font-weight: 700; white-space: nowrap; font-size: 14px; }
.suggest__empty { padding: 14px; color: var(--muted); }
.suggest__all { display: block !important; text-align: center; padding: 10px !important; font-weight: 600; border-top: 1px solid var(--line); color: var(--primary) !important; }
.header__actions { display: flex; gap: 4px; margin-left: auto; margin-right: -12px; } /* иконка корзины — по правому краю контейнера */
.hact { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; color: var(--text-2); font-size: 12px; font-weight: 500; border-radius: 10px; }
.hact:hover { background: var(--surface-2); color: var(--primary); }
.hact .ic { width: 24px; height: 24px; }
.hact--phone { display: none; }
.badge { position: absolute; top: 0; right: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; line-height: 20px; text-align: center; font-style: normal; }

.megamenu { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); max-height: 75vh; overflow: auto; }
.megamenu__in { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 32px; padding-top: 24px; padding-bottom: 28px; }
.megamenu__col { display: flex; flex-direction: column; gap: 6px; }
.megamenu__col a { color: var(--text-2); font-size: 14px; }
.megamenu__col a:hover { color: var(--primary); }
.megamenu__col small { color: var(--muted); }
.megamenu__root { font-weight: 700; font-size: 15px !important; color: var(--text) !important; margin-bottom: 4px; }

.catnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.catnav__in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-inline: 8px; } /* 20px контейнера − 12px ссылки: текст по краю */
.catnav__in::-webkit-scrollbar { display: none; }
.catnav a { padding: 11px 12px; white-space: nowrap; color: var(--text-2); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; }
.catnav a:hover, .catnav a.is-active { color: var(--primary); border-bottom-color: var(--primary); }

.main { min-height: 60vh; padding-bottom: 56px; }

/* ===== Общие блоки ===== */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 18px 0 10px; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.page-title { font-size: 28px; font-weight: 800; margin: 6px 0 16px; }
.page-title small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.panel > h2 { font-size: 18px; margin-bottom: 12px; }
.panel + .panel { margin-top: 16px; }
.section { margin-top: 36px; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.section__head h2 { font-size: 24px; font-weight: 800; margin: 0; }
.link-more { font-weight: 600; font-size: 14px; white-space: nowrap; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.prose { line-height: 1.7; max-width: 80ch; }
.prose h2 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.alert { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-weight: 500; background: var(--danger-bg); color: var(--danger); }
.alert p { margin: 0; }
.alert--ok, .notice { background: var(--ok-bg); color: var(--ok); padding: 12px 16px; border-radius: 12px; font-weight: 500; }
.alert--info { background: var(--primary-50); color: var(--primary-h); padding: 12px 16px; border-radius: 12px; }
.alert-inline { background: var(--danger-bg); color: var(--danger); border-radius: 12px; padding: 10px 14px; }
.alert-inline--ok { background: var(--ok-bg); color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap; }
.chip small, .chip span { color: var(--muted); font-weight: 600; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.is-active small { color: #c7d2fe; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

/* ===== Главная ===== */
.hero { background: radial-gradient(1200px 400px at 85% -10%, #3b82f6 0, transparent 60%), linear-gradient(135deg, #0f1f4d 0%, #1e3a8a 55%, #1d4ed8 100%); color: #fff; }
.hero__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding-top: 52px; padding-bottom: 52px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: #fcd34d; background: rgba(255, 255, 255, .08); padding: 5px 12px; border-radius: 99px; margin: 0 0 16px; }
.hero h1 { font-size: 42px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 14px; }
.hero__lead { color: #c7d2fe; font-size: 17px; max-width: 620px; margin: 0 0 26px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn--ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero .btn--primary { background: #fbbf24; color: #1f2937; }
.hero .btn--primary:hover { background: #f59e0b; }
.hero__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero__stats li { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 18px; }
.hero__stats b { display: block; font-size: 24px; font-weight: 800; }
.hero__stats span { color: #c7d2fe; font-size: 13px; }

.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.benefit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.benefit .ic { color: var(--primary); margin-bottom: 12px; width: 32px; height: 32px; }
.benefit h3 { font-size: 16px; margin-bottom: 6px; }
.benefit p { margin: 0; color: var(--muted); font-size: 14px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--text-2); font-size: 14px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-weight: 800; margin-bottom: 10px; }
.steps b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ===== Плитки категорий ===== */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.catcard { display: flex; gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); transition: box-shadow .2s, border-color .2s, transform .2s; min-width: 0; }
.catcard:hover { border-color: var(--primary-100); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.catcard__img { width: 80px; height: 80px; flex: none; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--primary); }
.catcard__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.catcard__img .ic { width: 36px; height: 36px; }
.catcard__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.catcard__title { font-weight: 700; font-size: 16px; }
.catcard__count { color: var(--primary); font-size: 13px; font-weight: 600; }

/* ===== Плитки позиций (аренда, товары, услуги — одинаково) ===== */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, border-color .2s; min-width: 0; }
.card:hover { box-shadow: var(--shadow); border-color: var(--primary-100); }
.card__img { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: 14px; border-bottom: 1px solid var(--line); color: var(--line-2); }
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.card__img > .ic { width: 64px; height: 64px; }
.tag { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; background: var(--primary-50); color: var(--primary-h); }
.tag--service { background: var(--accent-bg); color: var(--accent); }
.tag--off { background: var(--surface-2); color: var(--muted); }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px; flex: 1; }
.card__title { font-size: 14.5px; font-weight: 600; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--primary); }
.card__desc { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.card form { margin: 0; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.stock i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock--in { color: var(--ok); }
.stock--out { color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 0; }
.price__val { font-size: 20px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.price__unit { color: var(--muted); font-size: 13px; }

/* ===== Карточка позиции ===== */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.gallery { min-width: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 640px; margin-inline: auto; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 12px; background: #fff; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; object-fit: contain; }
.gallery-thumbs { position: relative; display: flex; gap: 8px; margin: 0; justify-content: safe center; overflow-x: auto; overflow-y: hidden; padding: 2px; scrollbar-width: thin; }
.gallery-thumbs button { width: 64px; height: 64px; flex: none; padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.gallery-thumbs button[aria-current] { border-color: var(--primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.gallery-empty { aspect-ratio: 1; max-width: 640px; margin-inline: auto; width: 100%; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--line-2); }
.gallery-empty .ic { width: 96px; height: 96px; }
/* Карточка номенклатуры: заголовок над фото; слева галерея, календарь, характеристики, описание; справа плавающий блок цены */
.pcard { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "gallery side" "main side"; gap: 16px 24px; align-items: start; }
.pcard__gallery { grid-area: gallery; margin: 0; }
.pcard__side { grid-area: side; align-self: stretch; }
.pcard__side .buybox { position: sticky; top: calc(var(--header-h, 72px) + 16px); background: var(--surface); box-shadow: var(--shadow); }
.pcard__main { grid-area: main; display: grid; gap: 16px; min-width: 0; }
.pcard__main > .panel { margin: 0; }
/* Галерея карточки — на всю ширину блока и по центру, без пустого поля справа */
.pcard__gallery { display: grid; justify-items: center; }
.pcard__gallery .gallery { max-width: 720px; }
.pcard__gallery .gallery-track img { aspect-ratio: 4 / 3; }
.pcard__gallery .gallery-thumbs button { width: 72px; height: 72px; }
.pcard__gallery .gallery-empty { max-width: 720px; aspect-ratio: 4 / 3; }
/* Описание растягивается на всю ширину, как блоки выше */
.pcard__main > .prose { max-width: none; }
.buybox__lead { margin: 0; color: var(--text-2); font-size: 14px; }
.container > .product__title { margin: 4px 0 16px; }

/* Галерея: стрелки и счётчик поверх ленты, миниатюры — прокручиваемой строкой */
.gallery-stage { position: relative; }
.gallery-track img { cursor: zoom-in; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%;
    background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); font-size: 26px; line-height: 1; cursor: pointer; color: var(--text); display: grid; place-items: center; padding: 0 0 3px; }
.gallery-nav:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.gallery-nav:disabled { opacity: 0; pointer-events: none; }
.gallery-nav--prev { left: 12px; }
.gallery-nav--next { right: 12px; }
.gallery-count { position: absolute; left: 12px; bottom: 12px; padding: 3px 10px; border-radius: 99px; background: rgba(15, 23, 42, .6); color: #fff; font-size: 12px; font-weight: 600; }
.gallery-zoom { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.gallery-zoom .ic { width: 18px; height: 18px; }
.gallery-thumbs button { flex: none; }

/* Полноэкранный просмотр фото */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 12, 24, .94); }
.lightbox::backdrop { background: rgba(8, 12, 24, .94); }
.lightbox__track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lightbox__track::-webkit-scrollbar { display: none; }
.lightbox__track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; padding: 56px 16px 24px; }
.lightbox__close, .lightbox__nav { position: fixed; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; border-radius: 50%; display: grid; place-items: center; line-height: 1; }
.lightbox__close { top: 12px; right: 12px; width: 44px; height: 44px; font-size: 30px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 34px; padding-bottom: 4px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .24); }

/* Полоса «цена + в корзину», когда блок цены ушёл с экрана: на компьютере — под шапкой, на телефоне — внизу */
.buybar { position: fixed; left: 0; right: 0; top: var(--header-h, 72px); z-index: 39; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); animation: buybar-in .18s ease-out; }
.buybar__in { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.buybar__name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar__price { flex: none; }
.buybar .btn { flex: none; min-height: 42px; }
@keyframes buybar-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes buybar-up { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .buybar { animation: none; } }

.product__info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.product__title { font-size: 26px; font-weight: 800; margin: 0; }
.product__ids { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; font-size: 14px; }
.product__ids dt { color: var(--muted); font-size: 12px; }
.product__ids dd { margin: 0; font-weight: 600; }
.buybox { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.buybox .price__val { font-size: 30px; }
.buybox__row { display: flex; gap: 10px; align-items: stretch; }
.buybox__row .btn { flex: 1; min-height: 48px; }
.buybox__note { margin: 0; color: var(--text-2); font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.buybox__note .ic { color: var(--primary); width: 18px; height: 18px; margin-top: 2px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; min-height: 40px; overflow: hidden; }
.qty__btn { width: 34px; align-self: stretch; border: 0; background: transparent; cursor: pointer; font-size: 18px; color: var(--muted); }
.qty__btn:hover { background: var(--surface-2); color: var(--primary); }
.qty__input { width: 48px; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; appearance: textfield; outline: none; background: transparent; padding: 0; }
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buybox .qty { min-height: 48px; }
.tiers { width: 100%; border-collapse: collapse; font-size: 14px; }
.tiers th, .tiers td { padding: 7px 0; border-bottom: 1px dashed var(--line); text-align: left; }
.tiers th { color: var(--muted); font-weight: 500; }
.tiers td { text-align: right; font-weight: 700; white-space: nowrap; }
.tiers em { font-style: normal; color: var(--ok); font-weight: 700; margin-left: 8px; font-size: 12px; background: var(--ok-bg); padding: 1px 7px; border-radius: 99px; }
.product__details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.product__details > .panel { margin: 0; }
.product__details .panel:only-child, .product__details .panel--wide { grid-column: 1 / -1; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td { padding: 9px 0; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
.specs th { color: var(--muted); font-weight: 500; width: 50%; padding-right: 16px; }

/* Календарь занятости: только просмотр, одна сетка по неделям, по дню — сколько экземпляров свободно */
.calbox h2 { font-size: 16px; margin: 0 0 8px; }
.calbox .muted { margin: 8px 0 0; }
.cal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cal__title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal__wd { text-align: center; font-size: 10.5px; color: var(--muted); padding-bottom: 1px; }
.cal__day { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 30px; border-radius: 6px; background: var(--surface-2); font-size: 11px; line-height: 1.05; white-space: nowrap; overflow: hidden; }
.cal__day b { font-size: 10px; font-weight: 800; }
.cal__day.is-free { background: var(--ok-bg); } .cal__day.is-free b { color: var(--ok); }
.cal__day.is-few { background: var(--warn-bg); } .cal__day.is-few b { color: var(--warn); }
.cal__day.is-none { color: var(--muted); } .cal__day.is-none b { color: var(--danger); }
.cal__day.is-out { background: transparent; color: var(--line-2); }
.cal__day.is-today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cal-legend .l-free { background: var(--ok-bg); border: 1px solid #86efac; }
.cal-legend .l-few { background: var(--warn-bg); border: 1px solid #fcd34d; }
.cal-legend .l-none { background: var(--surface-2); border: 1px solid var(--line-2); }

/* ===== Формы ===== */
.form { display: grid; gap: 14px; }
.field, .fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .fld > span, .fld legend, .field legend { font-size: 13px; color: var(--text-2); padding: 0; }
.field input, .field select, .field textarea, .fld input, .fld select, .fld textarea {
    min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; font-weight: 400; font-size: 15px;
    outline: none; transition: border-color .15s, box-shadow .15s; width: 100%; }
.field textarea, .fld textarea { padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.field input:disabled, .fld input:disabled, .field input[readonly] { background: var(--surface-2); color: var(--muted); }
.field small, .fld small { color: var(--muted); font-weight: 400; }
.field-error { color: var(--danger) !important; font-size: 13px; font-weight: 500; }
.grid2, .dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; padding: 4px 0; font-weight: 400; color: var(--text); }
.check input, .radio input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; margin-top: 2px; }
/* Радио и чекбоксы внутри .field (способ оплаты в корзине) не должны получать размеры текстового поля */
.field input[type="radio"], .field input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 2px 0 0; border: 0; border-radius: 0; box-shadow: none; flex: none; }
.field .radio { align-items: flex-start; line-height: 1.4; }
.field .radio > span { display: block; min-width: 0; }
.field .radio small { display: block; }
fieldset.field { gap: 4px; }
fieldset.field > legend { margin-bottom: 4px; font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin: 0; }
.seg label { text-align: center; padding: 9px 6px; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--primary); }
.code-input { font-size: 24px !important; letter-spacing: .4em; text-align: center; }

/* ===== Корзина ===== */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.cart__main { display: grid; gap: 16px; min-width: 0; }
.cart__aside { position: sticky; top: 90px; display: grid; gap: 14px; }
.cart__block { padding: 0; overflow: hidden; }
.cart__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cart__head h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.cart__head h2 .ic { color: var(--primary); }
.cart__body { padding: 16px 20px; display: grid; gap: 14px; }
.cart__hint { margin: 0; font-size: 14px; color: var(--text-2); }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto 36px; gap: 8px 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line__img { width: 64px; height: 64px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--line-2); overflow: hidden; flex: none; }
.line__img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.line__img .ic { width: 28px; height: 28px; }
.line__body { display: grid; gap: 2px; min-width: 0; }
.line__body a { color: var(--text); font-weight: 600; }
.line__body small { color: var(--muted); font-size: 12.5px; }
.line__sum { font-weight: 800; white-space: nowrap; text-align: right; min-width: 90px; }
.line__sum s { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.line.has-error { background: var(--danger-bg); }
.line__err { color: var(--danger); font-size: 13px; font-weight: 500; }
.line .qty { min-height: 36px; }
.line .qty__input { width: 40px; }
/* Единица количества — плашкой справа внутри поля: «− 2 + шт» */
.qty__unit { align-self: stretch; display: grid; place-items: center; min-width: 34px; padding: 0 9px; background: var(--primary-50); color: var(--primary-h);
    border-left: 1px solid var(--line-2); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.line__date { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.line__date input { min-height: 34px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 14px; color: var(--text); }
.line__date input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.cart__receive { display: grid; gap: 16px; }
.cart__block.is-chosen { border-color: var(--primary-100); }
.cart__pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1.5px solid var(--line-2); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.cart__pick input { position: absolute; opacity: 0; pointer-events: none; }
.cart__pick:has(input:checked) { border-color: var(--primary); background: var(--primary); color: #fff; }
.cart__pick:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.cart__hint--ok { display: flex; gap: 8px; align-items: flex-start; color: var(--ok); font-weight: 600; }
.cart__hint--ok .ic { width: 18px; height: 18px; margin-top: 2px; }
.pay-note { display: block; margin-top: 4px; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn) !important; font-size: 12.5px; line-height: 1.4; }
/* Раздел «Документы»: образцы договоров и актов */
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.doc-item { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.doc-item > .ic { width: 32px; height: 32px; color: var(--primary); flex: none; }
.doc-item__body { flex: 1; min-width: 0; }
.doc-item h2 { font-size: 16px; margin: 0 0 4px; }
.doc-item h2 a { color: inherit; }
.doc-item h2 a:hover { color: var(--primary); }
.doc-item p { margin: 0; color: var(--text-2); font-size: 14px; }
.doc-item__actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 640px) {
    .doc-item { flex-wrap: wrap; padding: 14px 16px; }
    .doc-item__body { flex-basis: calc(100% - 46px); }
    .doc-item__actions { width: 100%; }
    .doc-item__actions .btn { flex: 1; }
}
.cart:has(input[name=customer_type][value=org]:checked) [data-person-only] { display: none; }
.org-fields__new { display: grid; gap: 12px; }
.cart__add { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; display: flex; gap: 16px; flex-wrap: wrap; }
/* Срок аренды одним календарем (cart.js): кнопка «01.10 — 04.10», под ней выпадающее окно; на телефоне — на весь экран */
.cart__block--dates { overflow: visible; }
.cart__block--dates .cart__head { border-radius: var(--radius) var(--radius) 0 0; }
.drp { position: relative; }
.drp__trigger { display: flex; width: 100%; max-width: 360px; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0 14px;
    border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; cursor: pointer; text-align: left; }
.drp__trigger:hover, .drp__trigger[aria-expanded="true"] { border-color: var(--primary); }
.drp__trigger b { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.drp__trigger b .ic { color: var(--primary); }
.drp__trigger small { color: var(--muted); font-size: 13px; }
.drp__panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 40; width: 640px; max-width: calc(100vw - 32px); display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.drp__head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.drp__title { flex: 1; text-align: center; font-size: 13px; color: var(--muted); }
.drp__nav, .drp__close { width: 36px; height: 36px; flex: none; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; cursor: pointer; font-size: 18px; line-height: 1; }
.drp__nav:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.drp__nav:disabled { opacity: .3; cursor: default; }
.drp__close { display: none; border: 0; font-size: 26px; }
.drp__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px 16px; }
.drp__months { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.drp__month-title { margin-bottom: 6px; text-align: center; font-weight: 700; text-transform: capitalize; }
.drp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.drp__wd { padding: 4px 0; font-size: 12px; color: var(--muted); }
.drp__day { height: 40px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 14px; }
.drp__day:hover { background: var(--primary-50); }
.drp__day:disabled { color: var(--line-2); cursor: default; background: none; }
.drp__day.is-in { background: var(--primary-100); border-radius: 0; }
.drp__day.is-edge { background: var(--primary); color: #fff; font-weight: 700; }
.drp__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.drp__sum { font-size: 14px; }
.drp__btns { display: flex; gap: 8px; }
.receive { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.receive label { display: grid; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; background: #fff; }
.receive label:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.receive input { position: absolute; opacity: 0; pointer-events: none; }
.receive b { font-size: 15px; }
.receive small { color: var(--muted); font-size: 13px; }
.receive label:has(input:focus-visible) { outline: 2px solid var(--primary); }
.summary dl { margin: 0; display: grid; gap: 2px; }
.summary dl div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.summary .is-disc dd, .summary .is-disc dt { color: var(--ok); }
.summary__total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px !important; font-size: 19px; }
.summary__total dt { color: var(--text); font-weight: 700; }
.summary__total dd { font-weight: 800; }
.summary__vat { font-size: 13px; padding-top: 0 !important; }
.summary__vat dd { font-weight: 500; color: var(--muted); }
.summary__deposit { border-top: 1px dashed var(--line); margin-top: 4px; }
.summary__deposit dt small { display: block; font-size: 12px; }
.checkout { display: grid; gap: 12px; }
.org-fields { display: grid; gap: 12px; }
.cart:has(input[name=customer_type][value=person]:checked) .org-fields,
.cart:has(input[name=customer_type][value=person]:checked) [data-org-only] { display: none; }
.cart:has(input[name=receive][value=pickup]:checked) [data-delivery-only],
.cart:has(input[name=receive][value=delivery]:checked) [data-pickup-only] { display: none; }
.suggest-block { margin-top: 28px; }

/* ===== Заказ, оплата, инфо-страницы ===== */
.order-page { max-width: 860px; display: grid; gap: 16px; }
.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.order-head h1 { margin: 0; }
.status { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.status--new, .st-new { background: var(--primary-50); color: var(--primary); }
.status--in_work, .st-in_work { background: var(--warn-bg); color: var(--warn); }
.status--issued, .st-issued { background: #f3e8ff; color: #6b21a8; }
.status--accepted, .status--completed, .status--paid, .st-accepted, .st-completed { background: var(--ok-bg); color: var(--ok); }
.status--cancelled, .st-cancelled { background: var(--surface-2); color: var(--muted); }
.st-paid { background: var(--ok-bg); color: var(--ok); }
.status--unpaid, .st-unpaid { background: var(--danger-bg); color: var(--danger); }
.status--partial, .st-partial { background: var(--warn-bg); color: var(--warn); }
.order-row__st { display: flex; flex-wrap: wrap; gap: 6px; }
.warn { color: var(--warn); }
.line__body b a { color: var(--text); }
.line__body b a:hover { color: var(--primary); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
.kv div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.lines--static .line { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 0; }

.info { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.info__main { display: grid; gap: 16px; min-width: 0; }
.info__aside { display: grid; gap: 16px; position: sticky; top: 90px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature > .ic { width: 28px; height: 28px; color: var(--primary); flex: none; margin-top: 2px; }
.feature h3 { font-size: 16px; margin: 0 0 4px; }
.feature p { margin: 0; color: var(--text-2); }
.features { display: grid; gap: 18px; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 8px 0 0; }
.return-box__form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 12px; align-items: end; margin-top: 12px; }
@media (max-width: 640px) { .return-box__form { grid-template-columns: minmax(0, 1fr); } }
.slots li { padding: 5px 10px; border-radius: 8px; background: var(--primary-50); color: var(--primary-h); font-weight: 600; font-size: 13px; }
.paymethods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.paymethod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 8px; align-content: start; }
.paymethod > .ic { width: 32px; height: 32px; color: var(--primary); }
.paymethod h3 { margin: 0; font-size: 16px; }
.paymethod p { margin: 0; color: var(--text-2); font-size: 14px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .ic { color: var(--primary); margin-top: 2px; }
.contact-list small { display: block; color: var(--muted); font-size: 12px; }
.contact-list a, .contact-list b { font-weight: 600; font-size: 16px; }
.req { width: 100%; border-collapse: collapse; font-size: 14px; }
.req th, .req td { padding: 8px 0; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
.req th { color: var(--muted); font-weight: 500; width: 40%; padding-right: 12px; }
.req td { overflow-wrap: anywhere; }
.req--wide th { width: 32%; }
.contacts-card .contact-list { margin-bottom: 4px; }
.info__main > .paymethods { margin: 0; }
.pay-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; font-weight: 500; }

/* ===== Вход и кабинет ===== */
.auth { display: grid; place-items: center; padding-top: 32px; }
.auth__box { width: 100%; max-width: 440px; padding: 28px; display: grid; gap: 14px; }
.auth__box h1 { font-size: 24px; margin: 0; }
.auth__box .lead { margin: 0; font-size: 15px; }
.login-alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }
.account { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 16px; }
.acc-nav { position: sticky; top: 90px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.acc-nav__who { display: flex; gap: 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); min-width: 0; }
.acc-nav__who b { display: block; font-size: 14px; line-height: 1.3; }
.acc-nav__who small { display: block; color: var(--muted); font-size: 12px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 800; }
.acc-nav nav { display: grid; gap: 2px; }
.acc-nav nav a { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.acc-nav nav a:hover { background: var(--surface-2); }
.acc-nav nav a[aria-current] { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.acc-nav form { padding: 0 12px; }
.acc-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; overflow-wrap: anywhere; }
.acc-main h1 { margin: 0; }
.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.order-row { display: grid; grid-template-columns: 130px 1fr auto 110px; gap: 6px 16px; align-items: center; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); }
a.order-row:hover { border-color: var(--primary-100); box-shadow: var(--shadow); color: var(--text); }
.order-row > strong:last-child { text-align: right; }
.status-pill { justify-self: start; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); }
.masked { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; font-size: 14px; }
.masked dt { color: var(--muted); }
.masked dd { margin: 0; letter-spacing: .1em; }
.passport-form { display: grid; gap: 12px; margin-top: 14px; }
details > summary.btn { list-style: none; width: fit-content; }
details > summary.btn::-webkit-details-marker { display: none; }
.panel > form, .panel.form { display: grid; gap: 12px; }
form.panel { display: grid; gap: 12px; }

/* ===== Подвал ===== */
.footer { background: var(--navy); color: #a5b4fc; font-size: 14px; overflow-wrap: anywhere; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 32px; padding-top: 44px; padding-bottom: 32px; }
.footer a { color: #e0e7ff; }
.footer a:hover { color: #fff; }
.footer nav { display: flex; flex-direction: column; gap: 8px; }
.footer__h { color: #fff; font-size: 15px; margin-bottom: 8px; }
.footer__about p { margin: 14px 0 0; }
.footer__social { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
/* Кнопка бота MAX: подвал и страница заказа */
.max-btn { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-weight: 600; line-height: 1.2; transition: background .15s, border-color .15s; }
.max-btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); }
.max-btn .ic { width: 28px; height: 28px; padding: 5px; box-sizing: border-box; border-radius: 9px; background: linear-gradient(135deg, #4f8bff, #7c4dff); color: #fff; flex: none; }
.max-btn small { display: block; font-weight: 400; font-size: 12px; color: #a5b4fc; }
.max-cta { display: flex; align-items: center; gap: 14px; margin: 20px 0; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--primary-50), #f3edff); border: 1px solid var(--primary-100); color: var(--text); transition: box-shadow .15s, border-color .15s; }
.max-cta:hover { border-color: #b9c8ff; box-shadow: var(--shadow); }
.max-cta__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #4f8bff, #7c4dff); color: #fff; flex: none; }
.max-cta__ic .ic { width: 24px; height: 24px; }
.max-cta__text { flex: 1; min-width: 0; }
.max-cta__text b { display: block; font-size: 16px; }
.max-cta__text small { display: block; color: var(--text-2); font-size: 14px; margin-top: 2px; }
.max-cta__go { flex: none; padding: 9px 16px; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; }
.max-cta:hover .max-cta__go { background: var(--primary-h); }
.footer__req p { margin: 0 0 8px; overflow-wrap: anywhere; }
.footer__req b { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px; padding-bottom: 24px; font-size: 13px; }

/* ===== Тосты и окно подтверждения ===== */
.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; z-index: 200; width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: center; background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; animation: toast-in .25s ease; }
.toast a { color: #fcd34d; font-weight: 700; margin-left: auto; white-space: nowrap; }
.toast--error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
.cdlg { border: 0; padding: 0; border-radius: 16px; box-shadow: var(--shadow-lg); width: min(400px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
.cdlg::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.cdlg__box { margin: 0; padding: 22px 22px 18px; display: grid; gap: 18px; }
.cdlg__msg { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; white-space: pre-line; }
.cdlg__btns { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== «Сообщить об ошибке»: вкладка, прилипшая к правому краю окна ===== */
.bugw { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 150; display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; }
.bugw__btn { display: inline-flex; align-items: center; gap: 8px; writing-mode: vertical-rl; transform: rotate(180deg); padding: 14px 9px; border: 1px solid var(--line-2); border-left: 0;
    border-radius: 0 10px 10px 0; /* повёрнута на 180°: скругление и граница видны слева */ background: rgba(255, 255, 255, .97); color: var(--text-2); font: 600 13px var(--font); box-shadow: var(--shadow); cursor: pointer; }
.bugw__btn .ic { width: 18px; height: 18px; transform: rotate(90deg); }
.bugw__btn:hover, .bugw.is-open .bugw__btn { color: var(--danger); border-color: #fca5a5; }
.bugw__panel { width: min(340px, calc(100vw - 72px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; display: grid; gap: 10px; }
.bugw__head { display: flex; justify-content: space-between; align-items: center; }
.bugw__hint { margin: 0; font-size: 13px; color: var(--muted); }
.bugw__panel textarea { width: 100%; min-height: 110px; resize: vertical; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.bugw__panel textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }

/* ===== Ошибки ===== */
.error-page { max-width: 560px; margin: 12vh auto; padding: 0 16px; text-align: center; }
.error-code { font-size: 88px; font-weight: 800; color: var(--primary-100); line-height: 1; margin: 0; }

/* ===== Адаптив ===== */
@media (max-width: 1100px) {
    .benefits, .steps { grid-template-columns: 1fr 1fr; }
    .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cart, .info { grid-template-columns: 1fr; }
    .cart__aside, .info__aside { position: static; }
}
@media (max-width: 900px) {
    .hero__in { grid-template-columns: 1fr; padding-top: 32px; padding-bottom: 32px; }
    .hero h1 { font-size: 30px; }
    .product { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
    .pcard { grid-template-columns: minmax(0, 1fr); grid-template-areas: "gallery" "side" "main"; }
    .pcard__side .buybox { position: static; }
    .product__details { grid-template-columns: 1fr; }
    /* Категории верхней полосы на узком экране — строкой с прокруткой, телефон справа */
    .topbar__links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
    .topbar__links::-webkit-scrollbar { display: none; }
    .topbar__links a { white-space: nowrap; }
    .topbar__contacts { flex: none; }
    /* minmax(0, …): иначе длинные подписи и строки распирают колонку шире экрана */
    .account { grid-template-columns: minmax(0, 1fr); }
    .acc-nav { position: static; }
    .acc-nav nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-row { grid-template-columns: 1fr auto; }
}
@media (max-width: 640px) {
    .container { padding-inline: 16px; }
    .catnav__in { padding-inline: 4px; }
    .topbar__sections { margin-left: -8px; }
    .topbar__sections a { padding: 7px 8px; }
    h1, .page-title { font-size: 22px; }
    .header__in { gap: 10px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
    .search { order: 5; flex-basis: 100%; }
    .search input { height: 42px; }
    .search button { width: 34px; height: 34px; }
    .suggest a { grid-template-columns: 40px minmax(0, 1fr); }
    .suggest__price { grid-column: 2; }
    .logo__text small { display: none; }
    .logo__mark .ic { width: 34px; height: 34px; }
    .logo { flex: 1; min-width: 0; }
    .catalog-btn { min-height: 40px; padding: 0 12px; gap: 6px; }
    .hact span { display: none; }
    .hact { padding: 6px 8px; }
    .header__actions { margin-right: -8px; }
    .hact--phone { display: flex; }
    .topbar__contacts span { display: none; }
    .topbar__max { font-size: 0; padding: 4px; }
    .topbar__contacts .topbar__max .ic { margin-right: 0; width: 17px; height: 17px; }
    .max-cta { flex-wrap: wrap; }
    .max-cta__go { flex-basis: 100%; text-align: center; }
    .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .card__body { padding: 10px; }
    .card__desc { display: none; }
    .price__val { font-size: 17px; }
    .catgrid { grid-template-columns: minmax(0, 1fr); }
    .benefits, .steps, .grid2, .footer__grid { grid-template-columns: minmax(0, 1fr); }
    .section__head h2 { font-size: 20px; }
    .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
    .panel { padding: 16px; }
    .cal { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    /* Строка корзины на телефоне: фото, название и удаление сверху; количество и сумма — строкой ниже во всю ширину */
    .line { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "img body del" "qty qty sum"; gap: 10px 12px; padding: 12px 16px; }
    .line__img { grid-area: img; width: 52px; height: 52px; align-self: start; }
    .line__body { grid-area: body; }
    .line .qty, .line__qty { grid-area: qty; justify-self: start; }
    .line__sum { grid-area: sum; min-width: 0; align-self: center; }
    .line__del { grid-area: del; align-self: start; }
    .line__date input { flex: 1; min-width: 0; }
    .cart__head, .cart__body, .cart__add { padding-inline: 16px; }
    .kv div { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .buybox__row { flex-direction: column; }
    /* Состав заказа без картинок и кнопок: название слева, сумма справа */
    .lines--static .line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: none; padding-inline: 0; }
    .lines--static .line__body, .lines--static .line__sum { grid-area: auto; }
    .gallery { gap: 8px; }
    .gallery-thumbs { justify-content: flex-start; }
    .gallery-thumbs button, .pcard__gallery .gallery-thumbs button { width: 56px; height: 56px; padding: 3px; }
    .pcard__gallery .gallery-track img { aspect-ratio: 1; }
    .buybar { top: auto; bottom: 0; border-bottom: 0; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); animation-name: buybar-up; }
    .buybar__in { gap: 10px; min-height: 64px; }
    .buybar__name { display: none; }
    .buybar__price { flex: 1; }
    body.has-buybar { padding-bottom: 72px; }
    body.has-buybar .bugw { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
    .gallery-nav { display: none; }
    .drp__trigger { max-width: none; }
    .drp__panel { position: fixed; inset: 0; top: 0; width: auto; max-width: none; border: 0; border-radius: 0; z-index: 1000; }
    .drp__head { padding: 10px 16px; border-bottom: 1px solid var(--line); }
    .drp__close { display: block; }
    .drp__months { grid-template-columns: 1fr; }
    .drp__day { height: 44px; }
    .drp__foot { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .bugw { top: auto; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); transform: none; }
    .bugw__btn { writing-mode: horizontal-tb; transform: none; padding: 10px; border-radius: 10px 0 0 10px; border-left: 1px solid var(--line-2); border-right: 0; }
    .bugw__btn .ic { transform: none; }
    .bugw__btn span { display: none; }
    .bugw__panel { position: fixed; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); width: auto; }
}
@media print {
    .topbar, .header, .catnav, .footer, .toast-wrap, .bugw { display: none !important; }
}

/* Дополнительные страницы из админки (политика и т. п.) */
.content-page { max-width: none; margin: 0; }
.content-page h2 { font-size: 19px; }
.content-page h3 { font-size: 16px; margin-top: 1.2em; }
.content-page li { margin-bottom: .35em; }
.footer__legal a { white-space: nowrap; }
.checkout__docs { margin: 0; }

/* Корзина пересчитывается без перезагрузки: пока идёт запрос, суммы приглушены */
.cart.is-busy [data-cart-part="summary"], .cart.is-busy [data-cart-part="lines"] .line__sum { opacity: .55; transition: opacity .15s; }
.cart.is-busy [data-cart-part="submit"] .btn { pointer-events: none; opacity: .7; }

/* Заказ для клиента (по ссылке и в кабинете): статус, заказчик, условия, состав */
.order-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; overflow-wrap: anywhere; }
.order-body > .panel { margin: 0; }
.order-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.order-page { margin-top: 4px; }
.order-page > .page-title { margin-bottom: 0; }
/* Страница оплаты: без крошек заголовок прилипал к шапке — даём воздух сверху и под заголовком */
.pay-page { padding-top: 32px; padding-bottom: 32px; display: grid; gap: 16px; }
.pay-page > * { margin: 0; }
.pay-page > .page-title { margin-bottom: 8px; }
@media (max-width: 640px) { .pay-page { padding-top: 20px; } }
.link-back { font-weight: 600; font-size: 14px; }
.acc-main > p:has(> .link-back) { margin: -8px 0 12px; }
.order-row__who { display: block; color: var(--muted); font-size: 12.5px; }

/* Постраничная навигация (каталог, товары, услуги, поиск, кабинет) */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 24px; }
.pager__info { color: var(--muted); font-size: 14px; }
.pager__links { display: flex; flex-wrap: wrap; gap: 6px; margin-inline: auto; }
.pager__links a, .pager__links span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; }
.pager__links a:hover { border-color: var(--primary); color: var(--primary); }
.pager__links .is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager__links .pager__gap { border: 0; background: none; min-width: 20px; padding: 0; color: var(--muted); }

/* Ожидание SMS с кодом */
.code-wait { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm, 8px); background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.code-wait b { font-variant-numeric: tabular-nums; color: var(--text); }
.link-btn:disabled { color: var(--muted); cursor: not-allowed; }
.invoice-box p { margin: 0 0 10px; }
.invoice-box p:last-child { margin: 0; }

/* ===== Отзывы: звёзды, сводка, список, форма (карточка позиции и кабинет) ===== */
.stars { display: inline-flex; gap: 1px; font-size: 15px; line-height: 1; color: var(--line-2); letter-spacing: 0; white-space: nowrap; }
.stars i { font-style: normal; }
.stars .is-on { color: #f59e0b; }
.stars .is-half { background: linear-gradient(90deg, #f59e0b 50%, var(--line-2) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.container > .rating-link { margin: -10px 0 14px; }
.rating-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; }
.rating-link span { color: var(--muted); }
.rating-link:hover span { color: var(--primary); text-decoration: underline; }
.card__rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.card__rating .stars { font-size: 12.5px; }
.card__rating span { color: var(--muted); }

.reviews { display: grid; gap: 16px; }
.reviews > h2 { margin: 0; }
.rsum { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); }
.rsum__avg { display: grid; justify-items: center; gap: 4px; }
.rsum__avg > b { font-size: 34px; font-weight: 800; line-height: 1; }
.rsum__dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; }
.rsum__dist li { display: grid; grid-template-columns: 34px 1fr 28px; gap: 8px; align-items: center; }
.rsum__dist meter { width: 100%; height: 8px; }
.rsum__dist meter::-webkit-meter-bar { background: var(--line); border: 0; border-radius: 99px; height: 8px; }
.rsum__dist meter::-webkit-meter-optimum-value { background: #f59e0b; border-radius: 99px; }
.rsum__dist meter::-moz-meter-bar { background: #f59e0b; border-radius: 99px; }
.rnote { margin: 0; }
.review-list { display: grid; gap: 0; }
.review { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.review:first-child { border-top: 0; padding-top: 4px; }
.review__head { display: flex; align-items: center; gap: 12px; }
.review__head > div { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.review__head .avatar { width: 36px; height: 36px; border-radius: 50%; }
.review__body p, .review__reply p { margin: 0 0 6px; overflow-wrap: anywhere; }
.review__body p:last-child, .review__reply p:last-child { margin-bottom: 0; }
.review__photos { display: flex; gap: 8px; flex-wrap: wrap; }
.review__photos a { display: block; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.review__photos img { width: 100%; height: 100%; object-fit: cover; }
.review__reply { margin-left: 12px; padding: 10px 14px; border-left: 3px solid var(--primary-100); background: var(--primary-50); border-radius: 0 10px 10px 0; font-size: 14px; }
.review__reply > b { display: block; font-size: 12.5px; color: var(--primary-h); margin-bottom: 4px; }

.rwrite > summary { list-style: none; cursor: pointer; width: fit-content; }
.rwrite > summary::-webkit-details-marker { display: none; }
.rwrite[open] > summary { margin-bottom: 12px; }
.rform { display: grid; gap: 12px; }
.rstars { border: 0; padding: 0; margin: 0; }
.rstars legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0; margin-bottom: 4px; }
/* Звёзды справа налево: :checked ~ label красит выбранную и все «меньшие» (они идут после в разметке) */
.rstars__set { position: relative; display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rstars__set input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rstars__set label { font-size: 36px; line-height: 1; padding: 2px 3px; color: var(--line-2); cursor: pointer; transition: color .12s, transform .12s; -webkit-tap-highlight-color: transparent; }
.rstars__set label:hover, .rstars__set label:hover ~ label, .rstars__set input:checked ~ label { color: #f59e0b; }
.rstars__set input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.rstars__set label:active { transform: scale(1.15); }
.rform__foot { display: flex; gap: 10px; flex-wrap: wrap; }
.rform__foot .btn { min-height: 44px; }
.rform__foot .btn--primary { flex: 1; }
.rform__photo { cursor: pointer; }
.rform__photo:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.rform__previews { display: flex; gap: 8px; flex-wrap: wrap; }
.rform__previews figure { margin: 0; position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.rform__previews img { width: 100%; height: 100%; object-fit: cover; }
.rform__previews button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .7); color: #fff; cursor: pointer; line-height: 1; }
.rform__state { margin: 0; }
.rform.is-busy { opacity: .6; pointer-events: none; }
.rdone { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.rdone .ic { width: 20px; height: 20px; flex: none; }

.ritems { display: grid; gap: 12px; }
.ritem { display: grid; gap: 12px; }
.ritem__head { display: flex; gap: 12px; align-items: center; }
.ritem__head > div { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.ritem__head a { color: var(--text); }
.ritem__img { width: 56px; height: 56px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.ritem__img img { width: 100%; height: 100%; object-fit: cover; }
.ritem__mine { display: grid; gap: 6px; }
.ritem__mine p { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.ritem__reply { font-size: 14px; }
.review-cta { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--radius); background: var(--accent-bg); border: 1px solid var(--accent-line); }
.review-cta > .ic { width: 28px; height: 28px; color: #f59e0b; flex: none; }
.review-cta p { margin: 0; flex: 1; display: grid; }
.review-cta span { color: var(--text-2); font-size: 14px; }
.review-lead { margin: 0; }
.photo-box { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 12, 24, .94); }
.photo-box::backdrop { background: rgba(8, 12, 24, .94); }
.photo-box img { width: 100%; height: 100%; object-fit: contain; padding: 56px 16px 24px; }
@media (max-width: 640px) {
    .rsum { grid-template-columns: 1fr; }
    .rsum__avg { grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 4px 10px; }
    .rsum__avg > b { grid-row: span 2; }
    .rstars__set label { font-size: 40px; padding: 2px 4px; }
    .review-cta { flex-wrap: wrap; }
    .review-cta .btn { width: 100%; }
    .review__reply { margin-left: 0; }
}
