/* ==========================================================================
   Дисконт-Кострома — светлая яркая тема, максимальная полировка (v4)
   ========================================================================== */
:root {
    /* Ground / панели */
    --bg: #ffffff;
    --bg-soft: #f5f8fd;
    --bg-warm: #fff6ef;
    --panel: #ffffff;
    --panel-2: #f3f6fb;
    --line: #e6ecf4;
    --line-soft: #eef2f8;

    /* Текст */
    --ink: #15202e;
    --muted: #5c6b7d;
    --faint: #93a1b2;

    /* Акцент (яркий оранжевый — «выгода/скидки») */
    --accent: #ff6a1a;
    --accent-2: #ff8c3c;
    --accent-ink: #ffffff;
    --accent-soft: #fff0e6;
    --accent-glow: rgba(255, 106, 26, .28);

    /* Второй акцент (дружелюбный синий — доверие) */
    --blue: #2f6bff;
    --blue-2: #5d8bff;
    --blue-soft: #eaf0ff;

    /* Статусы */
    --green: #16a34a;
    --green-bg: #e7f7ee;
    --red: #ef4444;
    --red-bg: #fdecec;

    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 24px 60px rgba(28, 52, 92, .13);
    --shadow-sm: 0 8px 24px rgba(28, 52, 92, .08);
    --shadow-accent: 0 12px 30px rgba(255, 106, 26, .32);
    --wrap: 1140px;

    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Poppins", "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-variant-numeric: tabular-nums;
    overflow-x: hidden;
}
main { flex: 1; }
/* Короткая страница, которая заканчивается оранжевым блоком: свободное место — над блоком, а не между ним и подвалом */
main:has(> .cta-band:last-child) { display: flex; flex-direction: column; }
main > .cta-band:last-child { margin-top: auto; }

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
    margin: 0 0 .5em;
    text-wrap: balance;
}

::selection { background: var(--accent-soft); color: var(--accent); }

[hidden] { display: none !important; }

/* ---------- SVG-иконки и статусные точки ---------- */
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.16em; }
.icon--lg { width: 26px; height: 26px; }
.dot {
    display: inline-block; width: 9px; height: 9px; border-radius: 50%;
    vertical-align: 0.06em; flex: none;
}
.dot--green { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.dot--red { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Появление при скролле (класс вешает JS) ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- Кнопки ---------- */
.btn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    font-family: var(--font-body); font-weight: 600; font-size: .98rem; cursor: pointer;
    padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
    transition: transform .15s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease;
    text-decoration: none; white-space: nowrap; line-height: 1.1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
    box-shadow: var(--shadow-accent);
}
.btn--primary::after {
    content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
    transform: skewX(-20deg); transition: left .55s ease;
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px var(--accent-glow); color: var(--accent-ink); }
.btn--primary:hover::after { left: 130%; }
.btn--outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--accent); }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .2); color: var(--accent); }
.btn--ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn--ghost:hover { background: var(--panel-2); color: var(--ink); }
.btn--danger { background: #fff; color: var(--red); border-color: #f6c6c6; }
.btn--danger:hover { background: var(--red-bg); }
.btn--lg { padding: 16px 34px; font-size: 1.06rem; }
.btn--sm { padding: 8px 16px; font-size: .88rem; border-width: 1.5px; }
.btn--block { width: 100%; }

/* ---------- Логотип ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 40px; height: 40px; display: block; filter: drop-shadow(0 5px 12px var(--accent-glow)); transition: transform .3s ease; }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.05); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.16rem; letter-spacing: -.02em; }
.brand__sub { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav__link { position: relative; color: var(--muted); font-weight: 500; padding: 9px 14px; border-radius: 10px; font-size: .97rem; }
.main-nav__link:hover { background: var(--panel-2); color: var(--ink); text-decoration: none; }
.main-nav__link.is-active { color: var(--accent); }
.main-nav__link.is-active::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2.5px;
    border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.main-nav__cta { margin-left: 10px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(780px 480px at 84% -8%, rgba(255, 140, 60, .3), transparent 62%),
        radial-gradient(640px 480px at 2% 110%, rgba(47, 107, 255, .15), transparent 60%),
        linear-gradient(180deg, var(--bg-warm), var(--bg) 72%);
}
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: 0; opacity: .55; pointer-events: none;
    background-image: radial-gradient(var(--line) 1.3px, transparent 1.3px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(640px 420px at 78% 30%, #000, transparent 72%);
    mask-image: radial-gradient(640px 420px at 78% 30%, #000, transparent 72%);
}
.hero__decor { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; z-index: 0; }
.hero__decor--1 {
    width: 72px; height: 72px; top: 18%; right: 6%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); opacity: .16;
    animation: float 7s ease-in-out infinite;
}
.hero__decor--2 {
    width: 42px; height: 42px; bottom: 16%; left: 44%;
    background: linear-gradient(135deg, var(--blue), var(--blue-2)); opacity: .14;
    animation: float 9s ease-in-out infinite reverse;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }

.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .9fr; gap: 54px; align-items: center; }
.hero__badge {
    display: inline-flex; align-items: center; gap: 9px; background: #fff; color: var(--accent);
    font-weight: 600; font-size: .84rem; padding: 8px 18px; border-radius: 999px;
    box-shadow: var(--shadow-sm); margin-bottom: 24px;
}
.hero__badge::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); }
    70% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
.hero__title { font-size: 3.4rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .34em; }
.hero__title .hl {
    position: relative; display: inline-block; color: var(--accent); white-space: nowrap;
}
.hero__title .hl::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .22em; z-index: -1;
    background: linear-gradient(90deg, var(--accent-soft), rgba(255, 140, 60, .45)); border-radius: 4px;
}
.hero__lead { font-size: 1.18rem; color: var(--muted); margin-bottom: 1.7em; max-width: 42ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__stats { display: grid; gap: 16px; }
.stat {
    display: flex; align-items: center; gap: 18px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px;
    box-shadow: var(--shadow); position: relative; overflow: hidden;
    transition: transform .18s ease, box-shadow .25s ease;
}
.stat:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 28px 64px rgba(28, 52, 92, .16); }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--accent), var(--accent-2)); }
.stat__icon {
    flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem;
    background: var(--accent-soft); color: var(--accent);
}
.stat:nth-child(2) .stat__icon { background: var(--green-bg); color: var(--green); }
.stat:nth-child(3) .stat__icon { background: var(--blue-soft); color: var(--blue); }
.stat__num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat__num--green { color: var(--green); }
.stat__num--accent { color: var(--accent); }
.stat__label { color: var(--muted); font-size: .93rem; margin-top: 5px; }

/* ---------- Секции ---------- */
.section { padding: 84px 0; }
.section--muted { background: var(--bg-soft); }
.section__eyebrow {
    display: block; text-align: center; color: var(--accent); font-weight: 700; font-size: .82rem;
    text-transform: uppercase; letter-spacing: .14em; margin-bottom: 12px;
}
.section__eyebrow--left { text-align: left; }
.section__title { font-size: 2.3rem; text-align: center; margin-bottom: 1.15em; letter-spacing: -.03em; }
.section__title--left { text-align: left; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: none; }
.step {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px;
    box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(255, 106, 26, .35); }
.step::after {
    content: "→"; position: absolute; top: 42px; right: -26px; z-index: 2; color: var(--accent-2);
    font-size: 1.5rem; font-weight: 700; opacity: .8;
}
.step:last-child::after { content: none; }
.step__num {
    width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
    font-size: 1.4rem; margin-bottom: 18px; box-shadow: var(--shadow-accent);
    transition: transform .25s ease;
}
.step:hover .step__num { transform: rotate(-6deg) scale(1.08); }
.step h3 { font-size: 1.24rem; }
.step p { color: var(--muted); margin: 0; }
.step__legend { display: flex; flex-direction: column; gap: 8px; }
.step__legend-item { display: flex; align-items: baseline; gap: 8px; }
.step__legend-item .dot { flex: none; transform: translateY(1px); }

.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.benefits__col {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 38px;
    box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .18s ease, box-shadow .25s ease;
}
.benefits__col:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.benefits__col::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.benefits__col:nth-child(2)::before { background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
.checklist { list-style: none; padding: 0; margin: 0 0 28px; }
.checklist li { position: relative; padding-left: 36px; margin-bottom: 15px; color: var(--ink); }
.checklist li::before {
    content: "✓"; position: absolute; left: 0; top: 1px; color: #fff; font-weight: 800;
    background: linear-gradient(135deg, var(--green), #22c55e); width: 25px; height: 25px; border-radius: 50%;
    display: grid; place-items: center; font-size: .82rem; box-shadow: 0 4px 10px rgba(22, 163, 74, .3);
}

.ordered { padding-left: 22px; margin: 0 0 26px; }
.ordered li { margin-bottom: 12px; }
.ordered li::marker { color: var(--accent); font-weight: 700; }

/* ---------- CTA полоса ---------- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%); color: #fff; padding: 64px 0; }
.cta-band::before {
    content: ""; position: absolute; inset: 0; opacity: .35;
    background-image: radial-gradient(rgba(255, 255, 255, .35) 1.4px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(560px 360px at 8% -30%, #000, transparent 72%);
    mask-image: radial-gradient(560px 360px at 8% -30%, #000, transparent 72%);
}
.cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(520px 320px at 92% 130%, rgba(255, 255, 255, .22), transparent 60%); }
.cta-band__inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .2em; font-size: 2.1rem; letter-spacing: -.02em; }
.cta-band p { margin: 0; opacity: .95; font-weight: 500; font-size: 1.05rem; }

/* ---------- Блок «Для автосервисов» ---------- */
.service-invite {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 42px;
    box-shadow: var(--shadow);
}
.service-invite::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
.service-invite__icon {
    flex: none; width: 74px; height: 74px; border-radius: 20px; display: grid; place-items: center;
    font-size: 2.1rem; background: var(--blue-soft); color: var(--blue);
}
.service-invite__icon .icon { width: 32px; height: 32px; }
.service-invite__text { flex: 1; min-width: 260px; }
.service-invite__text .section__title { margin-bottom: .45em; }
.service-invite__text p { color: var(--muted); margin: 0; max-width: 62ch; }
.service-invite__btn { flex: none; }

/* ---------- Баннер «Товар дня»: слайдер, карточка «Классика» (фото слева) ---------- */
/* overflow-x: clip — лента шире контейнера (место под тень), но страница не скроллится вбок */
.section--deal { padding: 48px 0 0; overflow-x: clip; }
.deal-slider { position: relative; }
/* Лента прокручивается, а прокрутка обрезает всё за своими краями — поэтому даём ей поля
   под тень карточки (по 60px по бокам, 90px снизу) и компенсируем их отрицательными отступами.
   gap больше бокового поля, чтобы соседний слайд не выглядывал. */
.deal-slider__track {
    display: flex; gap: 120px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 30px 60px 90px; margin: -30px -60px -80px; scroll-padding-inline: 60px; scrollbar-width: none;
    /* Края ленты растворяются: по бокам — уезжающие карточки и тень, снизу — тень */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent),
                        linear-gradient(180deg, #000 calc(100% - 90px), transparent);
    -webkit-mask-composite: source-in;
            mask-image: linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent),
                        linear-gradient(180deg, #000 calc(100% - 90px), transparent);
            mask-composite: intersect;
}
.deal-slider__track::-webkit-scrollbar { display: none; }
.deal {
    position: relative; flex: 0 0 100%; scroll-snap-align: start; overflow: hidden;
    display: grid; grid-template-columns: 280px 1fr; gap: 34px; align-items: center; padding: 30px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.deal::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.deal__media { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-warm); }
.deal__media img { width: 100%; height: 100%; object-fit: contain; }
.deal__placeholder { width: 72px; height: 72px; color: var(--accent); opacity: .6; }
.deal__off {
    position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.deal__body { min-width: 0; }
.deal__badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
}
.deal__title { margin: 12px 0 8px; font-size: 1.7rem; line-height: 1.2; letter-spacing: -.02em; }
.deal__desc { margin: 0 0 16px; color: var(--muted); max-width: 64ch; }
.deal__buy {
    display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
    padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line-soft);
}
.deal__buy:empty { display: none; }
.deal__price { display: flex; align-items: baseline; gap: 10px; }
.deal__price-now { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--accent); }
.deal__price-old { color: var(--faint); font-size: 1.1rem; }
.deal__seller { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; font-size: .9rem; color: var(--muted); }
.deal__seller li { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.deal__seller .icon { margin-top: 3px; flex: none; color: var(--accent); }
.deal__seller a { color: inherit; }
.deal__seller a:hover { color: var(--accent); }

/* Стрелки и точки слайдера */
.deal-slider__arrow {
    position: absolute; top: calc(50% - 22px); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; padding: 0 0 3px; cursor: pointer;
    background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    font: 400 1.9rem/1 var(--font-display); transition: color .2s, border-color .2s;
}
.deal-slider__arrow:hover { color: var(--accent); border-color: var(--accent); }
.deal-slider__arrow--prev { left: -22px; }
.deal-slider__arrow--next { right: -22px; }
.deal-slider__nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.deal-slider__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.deal-slider__dots button {
    width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--line); transition: width .25s, background .25s;
}
.deal-slider__dots button.is-active { width: 26px; background: var(--accent); }

/* Сбоку стрелкам не хватает места — ставим их в строку с точками */
@media (max-width: 1240px) {
    .deal-slider__arrow { position: static; flex: none; width: 38px; height: 38px; font-size: 1.6rem; }
}
@media (max-width: 760px) {
    .deal { grid-template-columns: 1fr; gap: 22px; padding: 24px 20px; }
    .deal__media { width: 220px; margin: 0 auto; }
    .deal__title { font-size: 1.4rem; }
    .deal__seller { grid-template-columns: 1fr; }
    .deal__buy .btn { width: 100%; }
}

/* ---------- Страница «Товары дня» (deals.php) ---------- */
.deals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; align-items: start; }
.deal-card {
    position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.deals-grid { align-items: stretch; }
.deal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.deal-card::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
/* Фото: одна высота у всех, снимок вписан по центру на белом фоне */
.deal-card__media {
    position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
    height: 210px; padding: 22px 22px 14px; background: #fff; border-bottom: 1px solid var(--line-soft);
}
.deal-card__media img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.deal-card__media .deal__placeholder { width: 64px; height: 64px; }
.deal-card .deal__off { top: 14px; left: 14px; z-index: 2; font-size: .85rem; padding: 3px 10px; }
.deal-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
/* Название — не больше 2 строк, место под 2 строки есть всегда */
.deal-card__title {
    margin: 0 0 8px; font-size: 1.08rem; line-height: 1.3; letter-spacing: -.01em;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.6em;
}
/* Описание — 3 строки, раскрывается кнопкой */
.deal-card__about { min-height: calc(.9rem * 1.5 * 3); margin-bottom: 14px; }
.deal-card__desc {
    margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.deal-card__desc.is-open { display: block; -webkit-line-clamp: unset; }
.deal-card__more { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--accent); font: 600 .85rem var(--font-body); cursor: pointer; }
.deal-card__more:hover { text-decoration: underline; }
.deal-card__price { margin-bottom: 14px; }
.deal-card .deal__price-now { font-size: 1.65rem; }
.deal-card .deal__price-old { font-size: 1rem; }
/* Продавец — компактно, под чертой */
.deal-card__seller { display: grid; gap: 5px; padding-top: 12px; margin-bottom: 18px; border-top: 1px solid var(--line-soft); font-size: .85rem; color: var(--muted); }
.deal-card__store, .deal-card__row { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.deal-card__store { color: var(--ink); font-weight: 600; }
.deal-card__store .icon, .deal-card__row .icon { flex: none; margin-top: 2px; width: 15px; height: 15px; color: var(--accent); }
.deal-card__store span, .deal-card__row span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.deal-card__row a { color: inherit; }
.deal-card__row a:hover { color: var(--accent); }
.deal-card__legal { padding-left: 23px; font-size: .78rem; color: var(--faint); }
.deal-card__btn { margin-top: auto; width: 100%; }
.deals-empty {
    max-width: 560px; margin: 0 auto; padding: 44px 28px; text-align: center;
    background: var(--bg-warm); border-radius: var(--radius);
}
.deals-empty > .icon { color: var(--accent); }
.deals-empty h2 { margin: 12px 0 6px; font-size: 1.4rem; }
.deals-empty p { margin: 0 0 20px; color: var(--muted); }
.deal-slider__all { display: flex; justify-content: center; margin-top: 16px; }
.deal-slider__all a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); }

/* ---------- Заголовок страницы ---------- */
.page-head { position: relative; overflow: hidden; padding: 66px 0; background: linear-gradient(180deg, var(--bg-warm), var(--bg)); border-bottom: 1px solid var(--line-soft); }
.page-head::before { content: ""; position: absolute; inset: 0; background: radial-gradient(640px 300px at 88% -20%, rgba(255, 140, 60, .24), transparent 65%); }
.page-head::after {
    content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background-image: radial-gradient(var(--line) 1.3px, transparent 1.3px); background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(480px 260px at 85% 40%, #000, transparent 72%);
    mask-image: radial-gradient(480px 260px at 85% 40%, #000, transparent 72%);
}
.page-head .container { position: relative; z-index: 1; }
.page-head__eyebrow {
    display: inline-block; color: var(--accent); font-weight: 700; font-size: .82rem;
    text-transform: uppercase; letter-spacing: .14em; margin-bottom: 10px;
}
.page-head__title { font-size: 2.6rem; margin-bottom: .3em; letter-spacing: -.03em; }
.page-head__lead { color: var(--muted); font-size: 1.1rem; max-width: 62ch; margin: 0; }

/* ==========================================================================
   Реестр: единая панель управления (вкладки + поиск + статус + работы + карта)
   Одна карточка, одна тень; внутри — строки, разделённые тонкими линиями.
   ========================================================================== */
.reg-panel {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); margin-bottom: 26px;
}

/* --- Строка 1: вкладки разделов --- */
.reg-panel__tabs { display: flex; align-items: center; gap: 6px; padding: 10px 12px; flex-wrap: wrap; }
.reg-tab {
    display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: var(--radius-sm);
    color: var(--muted); font-weight: 600; font-size: .96rem; white-space: nowrap;
    transition: background .2s, color .2s;
}
.reg-tab .icon { color: var(--faint); transition: color .2s; }
.reg-tab:hover { text-decoration: none; color: var(--ink); background: var(--bg-soft); }
.reg-tab:hover .icon { color: var(--muted); }
.reg-tab--on, .reg-tab--on:hover { background: var(--accent-soft); color: var(--accent); }
.reg-tab--on .icon { color: var(--accent); }
.reg-tab__count {
    background: var(--panel-2); border-radius: 999px; padding: 1px 9px; font-size: .82rem; font-weight: 700;
    color: var(--muted);
}
.reg-tab--on .reg-tab__count { background: #fff; color: var(--accent); }
/* Ссылка на внешний магазин — не вкладка, поэтому справа и акцентным цветом */
.reg-panel__shop {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 10px 14px;
    border-radius: var(--radius-sm); color: var(--accent); font-size: .92rem; font-weight: 600;
}
.reg-panel__shop:hover { text-decoration: none; color: var(--accent); background: var(--accent-soft); }
.reg-panel__shop .icon--sm { width: .85em; height: .85em; opacity: .7; }

/* --- Строка 2: поиск + статус + карта --- */
.reg-panel__bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 14px; border-top: 1px solid var(--line-soft);
}
.reg-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 0; }
.reg-search__icon {
    position: absolute; left: 14px; width: 18px; height: 18px; color: var(--faint); pointer-events: none;
}
.reg-search__input {
    width: 100%; padding: 11px 16px 11px 42px; border: 1.5px solid var(--line); border-radius: 999px;
    font: inherit; font-size: .95rem; background: var(--bg-soft); color: var(--ink);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.reg-search__input::placeholder { color: var(--faint); }
.reg-search__input:focus {
    outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Статус участия — сегментированный переключатель */
.reg-status {
    display: flex; align-items: center; gap: 2px; padding: 3px;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
}
.reg-status__btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
    color: var(--muted); font-size: .92rem; font-weight: 500; white-space: nowrap;
    transition: background .2s, color .2s, box-shadow .2s;
}
.reg-status__btn:hover { text-decoration: none; color: var(--ink); }
.reg-status__btn--on {
    background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm);
}
.reg-status__count { color: var(--faint); font-size: .82rem; font-weight: 700; }
.reg-status__btn--on .reg-status__count { color: var(--accent); }

/* Кнопка карты — такой же «тихий» контрол, как остальные в панели */
.reg-map__toggle {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
    border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
    font: inherit; font-size: .92rem; font-weight: 600; color: var(--muted); cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}
.reg-map__toggle:hover { border-color: var(--faint); color: var(--ink); }
.reg-map__toggle.is-open { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.reg-map__count { color: var(--faint); font-size: .82rem; font-weight: 700; }
.reg-map__toggle.is-open .reg-map__count { color: var(--accent); }

/* --- Строка 3: фильтр по видам работ --- */
.reg-works { border-top: 1px solid var(--line-soft); }
.reg-works__summary {
    display: flex; align-items: center; gap: 10px; padding: 14px 18px;
    cursor: pointer; list-style: none; color: var(--ink);
}
.reg-works__summary::-webkit-details-marker { display: none; }
.reg-works__summary:hover { background: var(--bg-soft); }
.reg-works__summary .icon { color: var(--faint); flex: none; }
.reg-works[open] .reg-works__summary .icon { color: var(--accent); }
.reg-works__title { font-weight: 600; white-space: nowrap; }
.reg-works__badge {
    background: var(--accent); color: #fff; border-radius: 999px;
    padding: 1px 9px; font-size: .8rem; font-weight: 700;
}
/* Что выбрано — одной строкой с многоточием, чтобы панель не разъезжалась */
.reg-works__selected {
    color: var(--muted); font-size: .92rem; min-width: 0; flex: 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.reg-works__reset { flex: none; font-size: .9rem; font-weight: 600; color: var(--accent); }
.reg-works__chevron {
    flex: none; margin-left: auto; width: 18px; height: 18px; color: var(--faint);
    transition: transform .2s;
}
.reg-works[open] .reg-works__chevron { transform: rotate(180deg); }
.reg-works[open] .reg-works__summary { border-bottom: 1px solid var(--line-soft); }
.reg-works__body { padding: 14px 18px 20px; }
.reg-works__hint { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }
.reg-works__group { margin-bottom: 16px; }
.reg-works__group:last-child { margin-bottom: 0; }
.reg-works__group-title {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--faint); margin-bottom: 9px;
}
.reg-works__group-title::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.reg-works__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.work-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
    border: 1.5px solid var(--line); background: #fff; color: var(--muted);
    font-size: .88rem; font-weight: 500; transition: border-color .2s, background .2s, color .2s;
}
.work-chip:hover { text-decoration: none; border-color: var(--faint); color: var(--ink); }
.work-chip--on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.work-chip__count { color: var(--faint); font-size: .8rem; font-weight: 700; }
.work-chip--on .work-chip__count { color: var(--accent); }

/* --- Строка 4: карта (появляется по кнопке «На карте») --- */
.reg-map__body { padding: 16px 18px 18px; border-top: 1px solid var(--line-soft); }

/* Фильтрация без перезагрузки: пока грузится новый список — блокируем ссылки
   фильтров и слегка гасим реестр (с задержкой, чтобы быстрый ответ не мигал) */
[data-registry].is-filtering [data-filter-link] { pointer-events: none; }
[data-registry].is-filtering [data-registry-list] { opacity: .5; transition: opacity .2s .15s; }

/* ===== Карта участников ===== */
.map-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.map-search__input {
    flex: 1; min-width: 200px; padding: 11px 16px; border-radius: 999px;
    border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: .95rem;
}
.map-search__input:focus { outline: none; border-color: var(--accent); }
.map-search__status { color: var(--muted); font-size: .9rem; }
.stores-map {
    width: 100%; height: 440px; border-radius: var(--radius); overflow: hidden;
    border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); background: var(--bg-soft);
}
.stores-map__error { display: flex; align-items: center; justify-content: center; height: 100%; padding: 24px; color: var(--muted); text-align: center; }
.map-block__hint { color: var(--muted); font-size: .9rem; margin: 12px 0 0; }
.map-balloon { font-size: .95rem; line-height: 1.4; max-width: 240px; }
.map-balloon__row { margin-top: 4px; }
.map-balloon__status { font-weight: 600; }
.map-balloon__status--on { color: var(--green); }
.map-balloon__status--off { color: var(--red); }

/* ===== Выбор точки на карте (админка) ===== */
.map-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.map-picker__status { color: var(--muted); font-size: .9rem; }
.map-picker__status--warn { color: #b45309; font-weight: 600; }
.admin-map { width: 100%; height: 320px; border-radius: var(--radius-sm, 12px); overflow: hidden; border: 1.5px solid var(--line); }
.field__hint { color: var(--muted); font-size: .88rem; margin: 0 0 10px; }

.registry { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.registry__header {
    display: grid; grid-template-columns: 1fr 190px 200px; gap: 16px; padding: 16px 26px;
    background: var(--bg-soft); font-weight: 700; font-size: .8rem;
    text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.store-row {
    display: grid; grid-template-columns: 1fr 190px 200px; gap: 16px; padding: 20px 26px;
    border-top: 1px solid var(--line-soft); align-items: center; transition: background .15s ease, box-shadow .15s ease;
}
.store-row:hover { background: var(--bg-soft); }
.store-row--active { border-left: 4px solid var(--green); }
.store-row--inactive { border-left: 4px solid var(--red); }
.store-row__name { font-weight: 700; font-size: 1.12rem; display: flex; align-items: flex-start; gap: 12px; }
.store-row__name-text { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.store-row__logo { width: 42px; height: 42px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 2px; flex: none; }
.store-row__avatar {
    flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--accent);
    background: linear-gradient(135deg, var(--accent-soft), #ffe3cd);
}
.store-row--inactive .store-row__avatar { color: var(--faint); background: var(--panel-2); }
.store-row__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .92rem; margin-top: 6px; }
.store-row__phone { color: var(--muted); }
.store-row__phone:hover { color: var(--accent); }
.store-row__site { color: var(--muted); }
.store-row__site:hover { color: var(--blue); }
/* Виды работ строкой тегов */
.store-row__works {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    color: var(--muted); font-size: .92rem; margin-top: 8px;
}
.store-row__works > .icon { color: var(--faint); flex: none; }
.store-row__work {
    background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 999px;
    padding: 3px 10px; font-size: .84rem;
}
.store-row--inactive .store-row__work { color: var(--faint); }
.store-row__works-note { color: var(--faint); font-size: .87rem; margin-top: 6px; font-style: italic; }
.registry__col-status, .registry__col-discount { display: flex; }
.registry__col-discount { justify-content: flex-end; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .87rem; }
.badge--green { background: var(--green-bg); color: var(--green); }
.badge--red { background: var(--red-bg); color: var(--red); }

.discount {
    font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em;
    color: var(--accent); background: var(--accent-soft); border-radius: 14px; padding: 8px 16px; line-height: 1;
}
.discount--none { color: var(--faint); background: var(--panel-2); }

/* Скидки по трём картам в строке реестра */
.tier-list { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.tier {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 5px 12px; border-radius: 10px; background: var(--accent-soft); line-height: 1.1;
}
.tier__name { font-size: .82rem; font-weight: 600; color: var(--muted); }
.tier__val { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--accent); }

.registry__note { color: var(--muted); margin-top: 18px; }
.registry__disclaimer {
    display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 12px 16px;
    background: var(--bg-soft); border-radius: var(--radius-sm); color: var(--muted); font-size: .9rem;
}
.registry__disclaimer .icon { flex: none; margin-top: 2px; color: var(--blue); }
.map-block__hint--disclaimer { font-style: italic; }

/* Балун карты — тарифы */
.map-balloon__tiers { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.map-balloon__tier { display: flex; justify-content: space-between; gap: 12px; }
.map-balloon__tier b { color: var(--accent); }
.map-balloon__note { margin-top: 8px; font-size: .82rem; color: var(--muted); font-style: italic; }

/* Секция «Три дисконтные карты» на странице партнёрам */
.tier-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 8px; }
.tier-card {
    background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius);
    padding: 30px; box-shadow: var(--shadow-sm); text-align: center; transition: transform .18s, box-shadow .25s;
}
.tier-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.tier-card--media { border-top-color: var(--blue); }
.tier-card--premium { border-top-color: #b45309; }
.tier-card__name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.tier-card__range { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; letter-spacing: -.02em; color: var(--accent); margin-top: 10px; line-height: 1; }
.tier-card__range span { font-size: 1.3rem; }
.tier-card--media .tier-card__range { color: var(--blue); }
.tier-card--premium .tier-card__range { color: #b45309; }
.tier-card__label { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.tier-card__price { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .95rem; }
.tier-cards__note {
    display: flex; align-items: flex-start; gap: 8px; margin-top: 22px; color: var(--muted); font-size: .92rem;
}
.tier-cards__note .icon { flex: none; margin-top: 2px; color: var(--blue); }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); background: var(--bg-soft); border-radius: var(--radius); }

/* ---------- Партнёрам ---------- */
.terms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.terms__card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
    box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .25s, border-color .25s;
}
.terms__card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(255, 106, 26, .35); }
.terms__icon {
    width: 58px; height: 58px; border-radius: 16px; background: var(--accent-soft); display: grid; place-items: center;
    font-size: 1.7rem; margin-bottom: 16px; transition: transform .25s ease; color: var(--accent);
}
.terms__card:hover .terms__icon { transform: rotate(-6deg) scale(1.08); }
.terms__card:nth-child(2) .terms__icon { background: var(--blue-soft); color: var(--blue); }
.terms__card:nth-child(3) .terms__icon { background: var(--green-bg); color: var(--green); }
.terms__card:nth-child(4) .terms__icon { background: #fdf3d7; color: #b45309; }
.terms__card h3 { font-size: 1.14rem; }
.terms__card p { color: var(--muted); margin: 0; font-size: .96rem; }

/* Тарифы участия в карточке условий */
.terms__prices { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.terms__prices li {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    font-size: .94rem; color: var(--ink);
}
.terms__prices li::before { content: ''; order: 2; flex: 1; border-bottom: 1px dotted var(--line); }
.terms__prices li span { order: 1; color: var(--muted); }
.terms__prices li b { order: 3; font-weight: 700; white-space: nowrap; }
.terms__prices-note { margin-top: 10px !important; font-size: .88rem !important; color: var(--faint) !important; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* ---------- Формы ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.field { display: block; margin-bottom: 17px; }
.field__label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; }
.field__input {
    width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    font: inherit; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field__input::placeholder { color: var(--faint); }
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.field__input { resize: vertical; }

/* Поле пароля с кнопкой-«глазом» (см. password_field() в includes/helpers.php) */
.password-field { position: relative; display: block; }
.password-field__input { padding-right: 50px; }
.password-field__toggle {
    position: absolute; top: 0; right: 0; bottom: 0; width: 46px;
    display: flex; align-items: center; justify-content: center;
    padding: 0; border: 0; background: none; cursor: pointer;
    color: var(--faint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: color .2s;
}
.password-field__toggle:hover { color: var(--muted); }
.password-field__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; color: var(--accent); }
/* Показываем «зачёркнутый глаз» только когда пароль открыт (is-visible ставит JS) */
.password-field__icon--hide { display: none; }
.password-field.is-visible .password-field__icon--show { display: none; }
.password-field.is-visible .password-field__icon--hide { display: block; }
.password-field.is-visible .password-field__toggle { color: var(--accent); }
.field--check { display: flex; align-items: center; gap: 10px; }

/* Чекбоксы в стиле сайта: крупный квадрат, оранжевая заливка, белая галочка */
input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    flex: none; width: 24px; height: 24px; margin: 0; padding: 0;
    border: 1.5px solid var(--line); border-radius: 7px; background: #fff;
    cursor: pointer; position: relative;
    transition: border-color .18s, background .18s, box-shadow .18s;
}
input[type="checkbox"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
}
/* Белая галочка — inline-SVG, чтобы не тянуть картинку */
input[type="checkbox"]:checked::after {
    content: ''; position: absolute; inset: 0;
    background: no-repeat center/14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .55; }
.form__note { color: var(--muted); font-size: .92rem; margin: 12px 0 0; }
.form__agree {
    width: 100%; margin: 12px 0 0; text-align: center;
    color: var(--faint); font-size: .85rem; line-height: 1.5;
}
.form__agree-link {
    background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
    color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
    transition: color .15s ease;
}
.form__agree-link:hover { color: var(--accent); }
/* Невидимая капча: пустой контейнер, окно с заданием всплывает при подозрении */
.field--captcha { margin: 0 0 22px; }
.field--captcha .captcha-box:empty { display: none; }
.form__error { margin: 8px 0 0; color: var(--red, #ef4444); font-weight: 600; font-size: .92rem; }
.mobile-break { display: none; }
.field__label small { color: var(--faint); font-weight: 500; }

/* Переключатель типа участника (публичная форма) */
.type-switch { display: flex; gap: 10px; flex-wrap: wrap; }
.type-switch__option {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 11px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; color: var(--muted); font-weight: 500; font-size: .95rem;
    transition: border-color .2s, background .2s, color .2s;
}
.type-switch__option:hover { border-color: var(--faint); color: var(--ink); }
.type-switch__option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.type-switch__option input { accent-color: var(--accent); }

/* Желаемые скидки по картам в заявке */
.tier-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tier-input { display: flex; flex-direction: column; gap: 5px; }
.tier-input__name { font-size: .85rem; font-weight: 600; }
.tier-input__name small { color: var(--faint); font-weight: 500; display: block; }
.tier-input .field__input { text-align: center; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; }
.alert--success { background: var(--green-bg); color: #14803c; }
.alert--error { background: var(--red-bg); color: #b52020; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 44px; }
.contact-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
    color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .25s, border-color .25s;
}
.contact-card:hover { text-decoration: none; transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(47, 107, 255, .3); }
.contact-card__icon {
    width: 56px; height: 56px; border-radius: 16px; background: var(--blue-soft); display: grid; place-items: center;
    font-size: 1.6rem; margin-bottom: 15px; transition: transform .25s ease; color: var(--blue);
}
.contact-card:hover .contact-card__icon { transform: rotate(-6deg) scale(1.08); }
.contact-card__label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.contact-card__value { font-family: var(--font-display); font-weight: 600; font-size: 1.16rem; margin-top: 4px; }
.contacts-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    background: linear-gradient(120deg, var(--blue-soft), var(--accent-soft)); border-radius: var(--radius); padding: 40px;
}
.contacts-cta h2 { margin: 0 0 .2em; letter-spacing: -.02em; }
.contacts-cta p { margin: 0; color: var(--muted); }

/* ---------- Подвал ---------- */
.site-footer { position: relative; background: #141c2b; color: #aeb9c8; margin-top: auto; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--blue-2)); }
.site-footer__inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 40px; padding: 58px 20px; }
.site-footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer__col a, .site-footer__col span { display: block; color: #aeb9c8; margin-bottom: 9px; font-size: .95rem; }
.site-footer__col a:hover { color: var(--accent-2); }
.brand--footer .brand__name { color: #fff; }
.site-footer__desc { color: #7d8aa0; font-size: .92rem; margin-top: 12px; max-width: 32ch; }
.site-footer__bottom { border-top: 1px solid rgba(36, 48, 68, .55); padding: 18px 0; font-size: .88rem; color: #7d8aa0; }
.site-footer__bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.site-footer__links { display: inline-flex; gap: 18px; flex-wrap: wrap; }
.site-footer__admin { color: #7d8aa0; }
.site-footer__admin:hover { color: var(--accent-2); }
.site-footer__legal span { font-size: .9rem; }
.site-footer__social { display: flex; gap: 10px; margin-top: 18px; }
.site-footer__col .social-link {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0;
    border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; transition: background .2s, transform .2s;
}
.site-footer__col .social-link:hover { color: #fff; transform: translateY(-2px); }
.social-link .icon { width: 20px; height: 20px; }
.social-link--max .icon { width: 19px; height: 19px; }
.social-link--telegram:hover { background: #229ed9; }
.social-link--vk:hover { background: #0077ff; }
.social-link--max:hover { background: #7b3cff; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1180px) {
    .step::after { display: none; }
}
@media (max-width: 960px) {
    .hero { padding: 64px 0 56px; }
    .hero__inner { grid-template-columns: 1fr; gap: 36px; }
    .hero__title { font-size: 2.6rem; }
    .steps { grid-template-columns: 1fr; }
    .benefits, .two-col { grid-template-columns: 1fr; gap: 28px; }
    .terms { grid-template-columns: 1fr 1fr; }
    .tier-cards { grid-template-columns: 1fr; }
    .contacts { grid-template-columns: 1fr 1fr; }
    .site-footer__inner { grid-template-columns: 1fr 1fr; }
    .hero__decor { display: none; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch;
        background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px 20px; gap: 4px;
        box-shadow: var(--shadow); display: none;
    }
    .main-nav.is-open { display: flex; }
    .main-nav__link { padding: 13px 14px; }
    .main-nav__link.is-active::after { display: none; }
    .main-nav__cta { margin: 8px 0 0; }

    /* Панель реестра: контролы в столбик, каждый на всю ширину.
       flex: none обязателен — в колонке flex-basis задавал бы высоту, не ширину */
    .reg-panel__bar { flex-direction: column; align-items: stretch; }
    .reg-search { flex: none; }
    .reg-status { justify-content: space-between; }
    .reg-status__btn { flex: 1; justify-content: center; }
    .reg-map__toggle { justify-content: center; }

    .registry__header { display: none; }
    .store-row { grid-template-columns: 1fr; grid-template-areas: "main" "status" "disc"; row-gap: 12px; }
    .registry__col-main { grid-area: main; min-width: 0; }
    .registry__col-status { grid-area: status; }
    .registry__col-discount { grid-area: disc; justify-content: flex-start; }
    .registry__col-discount .tier-list { flex-direction: row; flex-wrap: wrap; width: auto; }
    .registry__col-discount .tier { flex: 1 1 auto; }
}

@media (max-width: 560px) {
    .hero__title { font-size: 2.15rem; }
    /* Вкладки — в столбик: длинные названия не влезают в две колонки */
    .reg-panel__tabs { flex-direction: column; align-items: stretch; gap: 4px; }
    .reg-tab { justify-content: flex-start; font-size: .93rem; }
    .reg-tab__count { margin-left: auto; }
    .reg-panel__shop { margin-left: 0; }
    .reg-status__btn { padding: 8px 9px; gap: 5px; font-size: .85rem; }
    .reg-status .dot { display: none; }
    .reg-works__summary { padding: 13px 14px; }
    .reg-works__selected { display: none; }
    .reg-works__body { padding: 14px 14px 18px; }
    .reg-map__body { padding: 14px; }
    .service-invite { padding: 28px 22px; }
    .service-invite__btn { width: 100%; }
    .section { padding: 54px 0; }
    .section__title { font-size: 1.75rem; }
    .terms, .contacts { grid-template-columns: 1fr; }
    .site-footer__inner { grid-template-columns: 1fr; gap: 28px; }
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { flex: 1 1 auto; width: 100%; padding-left: 20px; padding-right: 20px; }
    .mobile-break { display: inline; }
    .stores-map { height: 320px; }
    .page-head__title { font-size: 1.95rem; }
    .stat { padding: 18px 20px; }
    .stat__num { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

/* ===== Модальные окна (общие для сайта и админки) ===== */
body.modal-open { overflow: hidden; }
.modal[hidden] { display: none; }
.modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal__overlay { position: absolute; inset: 0; background: rgba(13, 16, 20, .6); backdrop-filter: blur(6px); }
.modal__dialog {
    position: relative; z-index: 1; background: #fff; border-radius: var(--radius);
    box-shadow: 0 32px 80px rgba(13, 16, 20, .3); width: 100%; max-width: 640px;
    max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px 28px;
    animation: modal-in .22s cubic-bezier(.2, .9, .3, 1);
}
.modal__dialog--sm { max-width: 440px; }
@keyframes modal-in {
    from { transform: translateY(18px) scale(.97); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
.modal__x {
    position: absolute; top: 12px; right: 14px; border: 0; background: transparent;
    font-size: 1.5rem; line-height: 1; color: var(--faint); cursor: pointer;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.modal__x:hover { background: var(--panel-2, #f1f3f5); color: var(--ink); transform: rotate(90deg); }
.modal__title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 10px; }
.modal__title .icon { color: var(--accent); width: 22px; height: 22px; }
.modal__text { color: var(--ink); font-size: 1rem; margin: 0 0 18px; line-height: 1.5; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.modal__actions .btn { flex: 1 1 auto; justify-content: center; }
.modal__actions .btn--ghost { flex: 0 0 auto; }

/* «Документная» модалка: фиксированные шапка и низ, прокручивается только текст */
.modal__dialog--doc {
    max-width: 760px; padding: 0; overflow: hidden;
    display: flex; flex-direction: column;
}
.modal__head {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 20px 26px 16px; border-bottom: 1px solid var(--line-soft);
}
.modal__head .modal__title { margin: 0; }
.modal__head .modal__x { position: static; flex: none; }
.modal__body { flex: 1 1 auto; overflow-y: auto; padding: 20px 26px 24px; overscroll-behavior: contain; }
.modal__body::-webkit-scrollbar { width: 8px; }
.modal__body::-webkit-scrollbar-track { background: transparent; }
.modal__body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.modal__body::-webkit-scrollbar-thumb:hover { background: var(--faint); }
.modal__foot {
    flex: none; display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 26px; border-top: 1px solid var(--line-soft);
    background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, .7));
}

/* Текст политики конфиденциальности */
.privacy-text h3 {
    display: flex; align-items: baseline; gap: 10px;
    font-size: 1.02rem; margin: 26px 0 10px; padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}
.privacy-text h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.privacy-text h3::before {
    content: ''; flex: none; align-self: center;
    width: 4px; height: 1em; border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.privacy-text p { color: var(--muted); font-size: .92rem; line-height: 1.62; margin: 0 0 10px; }
.privacy-text p:last-child { margin-bottom: 0; }

/* ===== Плашка cookies (первый заход) ===== */
.cookie-bar {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900;
    max-width: 760px; margin: 0 auto;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow); padding: 14px 18px;
    display: flex; align-items: center; gap: 16px;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; flex: 1; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.cookie-bar__link {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--accent); text-decoration: underline; font: inherit;
}
.cookie-bar__link:hover { text-decoration: none; }
.cookie-bar .btn { flex: none; }
.site-footer__privacy { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

@media (max-width: 560px) {
    .cookie-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .modal { padding: 12px; }
    .modal__dialog { padding: 22px 18px; }
    .modal__dialog--doc { padding: 0; max-height: calc(100vh - 24px); border-radius: 16px; }
    .modal__head { padding: 16px 18px 12px; }
    .modal__head .modal__title { font-size: 1.12rem; }
    .modal__body { padding: 16px 18px 20px; }
    .modal__foot { padding: 12px 18px; }
    .modal__foot .btn { width: 100%; }
}

/* Выбор видов работ галочками (works_checkboxes() в includes/helpers.php).
   Разделы идут одной колонкой сверху вниз, пункты внутри обтекают строку —
   так не остаётся пустот, которые давала сетка из колонок разной высоты. */
.works-picker { margin-bottom: 18px; }
.works-group { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.works-group:last-child { margin-bottom: 0; }
.works-group__title {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 0 0 9px; font-weight: 700; font-size: .78rem; text-transform: uppercase;
    letter-spacing: .05em; color: var(--faint);
}
/* Тонкая линия справа от названия раздела — визуально разделяет группы */
.works-group__title::after {
    content: ''; flex: 1; height: 1px; background: var(--line-soft);
}
.works-group__items { display: flex; flex-wrap: wrap; gap: 8px; }
/* Пункт-пилюля с чекбоксом: компактный, обтекает строку */
.work-check {
    display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
    padding: 6px 15px 6px 9px; border: 1.5px solid var(--line); border-radius: 999px;
    background: #fff; font-size: .9rem; color: var(--muted); line-height: 1.3;
    transition: border-color .18s, background .18s, color .18s;
}
.work-check:hover { border-color: var(--faint); color: var(--ink); }
.work-check:has(input:checked) {
    border-color: var(--accent); background: var(--accent-soft);
    color: var(--accent); font-weight: 600;
}
/* Внутри пилюли квадрат чуть меньше, чтобы строка не была высокой */
.work-check input[type="checkbox"] { width: 22px; height: 22px; border-radius: 6px; }

/* Выбор видов работ в форме заявки: кнопка попапа и сводка отмеченного */
.works-open { width: 100%; justify-content: center; }
.works-chosen {
    margin: 10px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.45;
}
.field--nested { margin-top: 14px; }
#works-modal .modal__body { padding-top: 22px; }
#works-modal .modal__foot { display: flex; gap: 10px; justify-content: flex-end; }

