/* ───────────────────────────────────────────────────────────────────────────
   polish.css — визуальная система AvenShop (10.10.2026). Грузится ПОСЛЕ style2/ux
   и перебивает их. Правила по DESIGN.md «Визуальная система»:
   1) лестница поверхностей вместо одинаковых стеклянных карточек (surface-0..3),
   2) волосяные линии вместо толстых рамок и свечений,
   3) крупный плотный дисплейный шрифт, вторичный текст читаемый,
   4) атмосфера: статичный градиентный фон на всех страницах, без canvas,
   5) цвет несёт смысл: зелёный/янтарный/красный — статусы, фиолетовый — бренд.
   Референсы: Raycast (лестница поверхностей, hairline, шкала радиусов),
   Superhuman (плотный дисплей, одна кнопка на блок).
   ─────────────────────────────────────────────────────────────────────────── */

:root {
    --surface-0: #0a0015;
    --surface-1: #110424;
    --surface-2: #190a33;
    --surface-3: #221043;
    --hairline: rgba(192, 132, 252, .14);
    --hairline-strong: rgba(192, 132, 252, .32);
    --text-secondary: #d3c7ea;
    --text-muted: #a596c3;
    --r-card: 18px;
    --r-ctl: 12px;
    --fs-h1: clamp(2.1rem, 1.3rem + 2.3vw, 3.2rem);
    --fs-h2: clamp(1.75rem, 1.2rem + 1.7vw, 2.5rem);
    --shadow-float: 0 24px 60px -24px rgba(124, 58, 237, .45);
}
.light-theme {
    --surface-0: #f8f6ff;
    --surface-1: #ffffff;
    --surface-2: #f3eefc;
    --surface-3: #ebe3f9;
    --hairline: rgba(124, 58, 237, .16);
    --hairline-strong: rgba(124, 58, 237, .36);
    --text-secondary: #4a3860;
    --text-muted: #5d4d7a;
    --shadow-float: 0 24px 60px -28px rgba(124, 58, 237, .35);
}

/* ── Атмосфера: два мягких пятна бренда на всю страницу, статично ─────────── */
html { background: var(--bg-primary); }
body { background: transparent; }
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1000px 640px at 8% -6%, rgba(124, 58, 237, .26), transparent 62%),
        radial-gradient(760px 520px at 104% 18%, rgba(192, 132, 252, .11), transparent 58%),
        radial-gradient(900px 520px at 50% 108%, rgba(124, 58, 237, .16), transparent 62%);
}
.light-theme body::before {
    background:
        radial-gradient(1000px 640px at 8% -6%, rgba(124, 58, 237, .12), transparent 62%),
        radial-gradient(760px 520px at 104% 18%, rgba(192, 132, 252, .10), transparent 58%);
}

/* ── Шапка: волосяная линия снизу ─────────────────────────────────────────── */
.navbar { box-shadow: inset 0 -1px 0 var(--hairline); }

/* ── Типографика ──────────────────────────────────────────────────────────── */
.section-title {
    font-size: var(--fs-h2);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.08;
}
.section-subtitle { font-size: 1.02rem; color: var(--text-secondary); max-width: 64ch; }
.section-header { margin-bottom: 2.4rem; }
.sec-kicker { font-size: .72rem; letter-spacing: .16em; }
.page-title {
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.06;
    margin-bottom: .75rem;
}
.page-subtitle { font-size: 1.05rem; line-height: 1.6; max-width: 64ch; }
.breadcrumb { font-size: .8rem; letter-spacing: .02em; }
.price-main, .price-current, .bento-big, .product-reviews-avg-num, .sticky-buy-price, .tariff-price,
.cal-clock, .st-facts, .compare-price b { font-variant-numeric: tabular-nums; }

/* ── Лестница поверхностей: карточки и контейнеры ─────────────────────────── */
.glass-card, .product-card, .feature-card, .faq-item, .review-card, .blog-card, .f-section-card,
.f-side-card, .cal-card, .compare-wrap, .review-cta-card, .review-mybox, .review-form,
.stock-notify, .send-pc, .seo-details, .empty-state, .pc-card, .pc-card-h,
.related-products .product-card, .ws-panel, .hit-card {
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.product-card, .feature-card, .review-card, .glass-card, .f-section-card, .hit-card { border-radius: var(--r-card); }
.faq-item, .blog-card, .cal-card, .review-cta-card, .review-mybox { border-radius: 16px; }
.product-card:hover, .feature-card:hover, .blog-card:hover, .f-section-card:hover, .review-card:hover, .faq-item:hover {
    background: var(--surface-2);
    border-color: var(--hairline-strong);
    box-shadow: var(--shadow-float);
    transform: translateY(-3px);
}
.faq-item:hover { transform: none; }
.faq-item.active { background: var(--surface-2); border-color: var(--hairline-strong); }
.section-dark {
    background: var(--surface-1);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}
.section-dark::before, .section-dark::after { display: none; }
.section-dark :is(.feature-card, .faq-item, .review-card) { background: var(--surface-2); }
.section-dark :is(.feature-card, .faq-item, .review-card):hover, .section-dark .faq-item.active { background: var(--surface-3); }
.section-dark + .section { border-top: 0; }
/* между соседними секциями — волосяная линия вместо пустоты */
.section + .section:not(.section-dark) { border-top: 1px solid var(--hairline); }
.section { padding: 4.75rem 0; }
@media (max-width: 768px) { .section { padding: 3rem 0; } }

/* ── Кнопки, поля, чипы ───────────────────────────────────────────────────── */
.btn { border-radius: var(--r-ctl); font-weight: 600; letter-spacing: .005em; }
.btn-primary {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 26px -10px rgba(124, 58, 237, .75);
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 32px -10px rgba(124, 58, 237, .9); }
.btn-outline, .btn-secondary { border-color: var(--hairline-strong); background: var(--surface-1); }
.btn-outline:hover, .btn-secondary:hover { background: var(--surface-2); }
.form-control {
    background: var(--surface-1);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-ctl);
}
.gh-badge, .pf-chip, .hero-status-line {
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    font-size: .82rem;
    font-weight: 600;
}
.gh-badge.gh-status, .pf-chip.pf-status { background: var(--surface-2); }

/* ── Плавающие слои: на десктопе только Telegram, «Наверх» не нужен ───────── */
@media (min-width: 769px) { .to-top { display: none !important; } }

/* ── Форум: иконки разделов в бренде, цвет только по смыслу ───────────────── */
/* forum.css и calendar.css подключаются в extra_css ПОСЛЕ polish.css, а цвета разделов заданы inline (--c1/--c2):
   поэтому здесь выше специфичность и !important только на кастомных свойствах */
.f-sections .f-section-card, .f-sec-head { --c1: #a855f7 !important; --c2: #7c3aed !important; }
body .f-sec-icon, body .f-sec-icon-lg {
    background: var(--surface-3);
    color: var(--accent-light);
    border: 1px solid var(--hairline-strong);
    box-shadow: none;
}
body .f-section-card::before { opacity: .55; }
body .f-topic-row::before { background: var(--hairline-strong); }
body .f-section-card, body .f-side-card, body .glass-card.f-card-tight { background: var(--surface-1); border-color: var(--hairline); }

/* ── Блог: карточка статьи ────────────────────────────────────────────────── */
.blog-card-img { border-radius: 12px 12px 0 0; }
.blog-card .blog-card-body h3 { letter-spacing: -.01em; }

/* ── Категория: сетка под число товаров, без дыр ──────────────────────────── */
.products-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 880px; }
.products-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .products-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .products-grid.cols-2, .products-grid.cols-3 { grid-template-columns: 1fr; } }
.cat-products.section { padding-top: 2.75rem; }
.cat-seo.section { padding: 2.75rem 0; }
.compare-wrap { margin-top: 2.5rem; padding: 1.4rem 1.5rem; border-radius: var(--r-card); }
.game-hero .page-title { max-width: 18ch; }

/* ── Страница товара ──────────────────────────────────────────────────────── */
.product-layout { grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: 3rem; }
@media (max-width: 1024px) { .product-layout { gap: 2rem; } }
.product-image-main {
    border-radius: 22px;
    border: 1px solid var(--hairline-strong);
    background:
        radial-gradient(70% 60% at 30% 20%, rgba(168, 85, 247, .22), transparent 70%),
        var(--surface-1);
    box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.product-image-main::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03); }
.product-thumbs img, .product-thumbs .thumb {
    width: 92px; height: 58px;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    opacity: .75;
    transition: opacity .2s ease, border-color .2s ease;
}
.product-thumbs img.active, .product-thumbs img:hover { opacity: 1; border-color: var(--accent-light); }
.product-category-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: none; border: 0; padding: 0;
    font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--accent-light);
}
.product-category-badge i { font-size: .8rem; }
.product-title {
    font-family: var(--font-display);
    font-size: clamp(1.95rem, 1.3rem + 1.7vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.06;
    margin: .5rem 0 .75rem;
}
.product-proof { font-size: .95rem; margin: -.2rem 0 1rem; }
.product-short-desc { font-size: 1.02rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 1.25rem; }
/* строка фактов: одна полоса с разделителями вместо россыпи пилюль */
.product-facts {
    gap: 0;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    background: var(--surface-1);
    overflow: hidden;
    margin-bottom: 1.6rem;
}
.product-facts .pf-chip {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 46px;
    padding: .55rem 1rem;
    border: 0;
    border-right: 1px solid var(--hairline);
    border-radius: 0;
    background: transparent;
    font-size: .86rem;
}
.product-facts .pf-chip:last-child { border-right: 0; }
.product-facts .pf-chip.pf-status, .product-facts .pf-chip.pf-status.status-updating, .product-facts .pf-chip.pf-status.status-detected { border-right-color: var(--hairline); border-bottom-color: var(--hairline); }
.product-facts .pf-chip.pf-status, .product-facts .pf-chip.pf-status.status-updating, .product-facts .pf-chip.pf-status.status-detected { background: transparent; }
@media (max-width: 520px) {
    .product-facts { flex-direction: column; }
    .product-facts .pf-chip { border-right: 0; border-bottom: 1px solid var(--hairline); justify-content: flex-start; }
    .product-facts .pf-chip:last-child { border-bottom: 0; }
}

/* тарифы: шкала срока строками — срок, цена в день, цена; выбранная строка подсвечена */
.tariffs-legend { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .6rem; }
.tariffs-legend i { color: var(--accent-light); }
.tariffs-grid, .tariffs-grid.is-single { grid-template-columns: 1fr; gap: .5rem; padding-top: 0; }
.tariff-card, .tariffs-grid.is-single .tariff-card {
    min-height: 0;
    padding: .8rem 1.1rem .8rem 2.9rem;
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "name badge price" "term term price" "hint hint hint";
    column-gap: .75rem;
    row-gap: .1rem;
    align-items: center;
    border-radius: 14px;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    box-shadow: none;
    transform: none;
    overflow: hidden;
}
.tariff-card::before { display: none; }
.tariff-card:hover { transform: none; border-color: var(--hairline-strong); background: var(--surface-2); box-shadow: none; }
.tariff-card.selected, .tariffs-grid.is-single .tariff-card.selected {
    transform: none;
    background: var(--surface-3);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 14px 36px -18px rgba(168, 85, 247, .8);
}
.tariff-card.tariff-popular { background: var(--surface-1); border-color: var(--hairline); }
.tariff-card.tariff-popular::before { display: none; }
/* радио-кружок слева: у выбранной — галочка */
.tariff-card::after, .tariff-card.selected::after, .tariffs-grid.is-single .tariff-card.selected::after {
    content: '';
    display: flex;
    position: absolute;
    top: 50%; left: 14px;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    margin: 0;
    border-radius: 50%;
    border: 2px solid var(--hairline-strong);
    background: transparent;
    box-shadow: none;
    font-size: .62rem;
    align-items: center; justify-content: center;
}
.tariff-card.selected::after, .tariffs-grid.is-single .tariff-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #c084fc, #7c3aed);
}
.tariff-card .tariff-name, .tariffs-grid.is-single .tariff-name { grid-area: name; margin: 0; font-size: 1rem; font-weight: 700; }
.tariff-card .tariff-badge { grid-area: badge; position: static; justify-self: start; margin: 0; transform: none; font-size: .64rem; letter-spacing: .08em; padding: .18rem .5rem; }
.tariff-card .tariff-duration, .tariffs-grid.is-single .tariff-duration { grid-area: term; justify-self: start; margin: 0; font-size: .82rem; color: var(--text-muted); }
.tariff-card.selected .tariff-duration { color: var(--text-secondary); }
.tariff-card .tariff-price, .tariffs-grid.is-single .tariff-price { grid-area: price; margin: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.tariff-card .tariff-price .price-main, .tariff-card.selected .tariff-price .price-main { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--text-primary); text-shadow: none; }
.tariff-card .tariff-price .price-old { font-size: .78rem; color: var(--text-muted); }
.tariff-card .tariff-notify-hint, .tariffs-grid.is-single .tariff-notify-hint { grid-area: hint; font-size: .8rem; }
.tariff-card.tariff-disabled, .tariff-card.tariff-disabled:hover { background: var(--surface-0); border-style: dashed; opacity: .75; transform: none; }
.tariff-card.tariff-disabled::before { display: none; }

.buy-section { margin-top: 1.1rem; }
.buy-section .btn-lg { min-height: 58px; font-size: 1.05rem; border-radius: 14px; }
.buy-summary { font-size: .95rem; color: var(--text-secondary); margin-top: .6rem; }
.buy-trust-badges { font-size: .8rem; color: var(--text-muted); gap: .4rem 1rem; margin-top: .7rem; }
.buy-trust-badges i { color: var(--accent-light); }

/* возможности: группы с чипами вместо списка-таблицы */
.product-features { margin-top: 2rem; }
.product-features h3, .product-sysreq h3 { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .7rem; }
.product-features h3 i, .product-sysreq h3 i { color: var(--accent-light); background: none; width: auto; height: auto; }
.product-features .feat-count { font-family: var(--font); font-size: .7rem; letter-spacing: 0; color: var(--accent-light); background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 999px; padding: .1rem .5rem; }
.feat-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.feat-group { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: 14px; padding: .85rem .95rem; min-width: 0; }
.feat-group.is-wide { grid-column: 1 / -1; }
.feat-group h4 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .55rem; font-size: .82rem; font-weight: 700; color: var(--text-primary); }
.feat-group h4 i { color: var(--accent-light); font-size: .8rem; }
.feat-chips { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.feat-chips li {
    font-size: .8rem; line-height: 1.2;
    padding: .3rem .55rem;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    color: var(--text-secondary);
}
.light-theme .feat-chips li { color: var(--text-primary); }

/* системные требования: три плитки в ряд */
.product-sysreq { margin-top: 1.6rem; }
.sysreq-grid { display: flex; flex-direction: row; flex-wrap: wrap; gap: .5rem; background: none; border: 0; border-radius: 0; }
.sysreq-row, .sysreq-row:last-child { flex: 1 1 150px; display: flex; flex-direction: column; gap: .2rem; padding: .6rem .85rem; font-size: .88rem; background: var(--surface-1); border: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); border-radius: 12px; }
.sysreq-label { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.sysreq-value { font-weight: 600; font-size: .9rem; }

/* как получить: три шага */
.pd-steps-wrap { margin-top: 3rem; }
.pd-h2, .product-description h2, .product-faq h2, .product-reviews h2, .related-products h2 {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
    display: flex; align-items: center; gap: .6rem;
    margin-bottom: 1.1rem;
}
.pd-h2 i, .product-description h2 i, .product-faq h2 i, .product-reviews h2 i, .related-products h2 i { color: var(--accent-light); font-size: .9em; }
.pd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; counter-reset: step; }
.pd-step { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.15rem 1.2rem 1.2rem; background: var(--surface-1); border: 1px solid var(--hairline); border-radius: 16px; min-width: 0; }
.pd-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1; color: var(--accent-light); opacity: .9; }
.pd-step strong { font-size: 1rem; margin-top: .2rem; }
.pd-step span { font-size: .9rem; line-height: 1.55; color: var(--text-secondary); }
.pd-step a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 768px) { .pd-steps { grid-template-columns: 1fr; } }

.product-description, .light-theme .product-description { margin-top: 2.5rem; background: none; border: 0; padding: 0; box-shadow: none; }
.product-description .description-content { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 1.4rem 1.6rem; }
.description-content h3 { font-size: 1.05rem; margin: 1.2rem 0 .5rem; }
.description-content p, .description-content li { color: var(--text-secondary); line-height: 1.65; }
.related-products { margin-top: 3rem; }

/* липкая панель покупки на телефоне */
.sticky-buy { background: var(--surface-1); border-top: 1px solid var(--hairline-strong); box-shadow: 0 -12px 40px rgba(0, 0, 0, .35); }

/* ── Вход / регистрация: карточка не теряется в пустоте ───────────────────── */

/* ── Поверхности браузера: выделение, каретка, фокус, скроллбар — в палитре ── */
::selection { background: rgba(168, 85, 247, .45); color: #fff; }
.light-theme ::selection { background: rgba(124, 58, 237, .25); color: inherit; }
input, textarea { caret-color: var(--accent-light); }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.btn:focus-visible, .form-control:focus-visible { outline-offset: 3px; }
@supports (scrollbar-color: red blue) {
    html { scrollbar-color: rgba(168, 85, 247, .45) transparent; scrollbar-width: thin; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, .35); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, .6); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
a { text-underline-offset: 3px; }

/* ── Вход / регистрация: карточка по центру экрана, заголовок крупнее ──────── */
.container:has(> .glass-card > .auth-title) { min-height: calc(100vh - 300px); display: flex; flex-direction: column; justify-content: center; }
.auth-title { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -.02em; }
