/* ==========================================================================
   COMPONENTS — переиспользуемые блоки витрины.
   Общая СТРУКТУРА для обеих тем; цвет/форма/тень — только через токены
   из themes.css (--surface/--accent/--border/--radius-card/--glow/--font-*).
   Тема-специфику класть в блоки [data-theme="acid"] в конце секции.
   ========================================================================== */

/* ==========================================================================
   HERO (главная). Белая тема — чистый жирный блок с жёлтым хайлайтом.
   Acid — неон, glow, пиксельный заголовок. Всё на токенах.
   ========================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    padding: clamp(2.25rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3.5rem);
    text-align: center;
    background: var(--surface);
    border: 2px solid var(--border-soft);
    border-radius: var(--radius-card);
}

.hero__inner {
    position: relative;
    z-index: 2;
}

.hero__eyebrow {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.35rem 1rem;
    font-family: var(--font-head);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-contrast);
    background: var(--accent);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--glow);
}

.hero__title {
    margin-bottom: 1rem;
    font-family: var(--font-head);
    font-weight: 900;
    font-size: clamp(2.2rem, 8vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--text);
}

/* Подсветка слова: в белой — жёлтый бокс с тёмным текстом (читаемо),
   в acid — неон-текст со свечением. */
.hero__title .hl {
    /* inline-block + line-height < 1 → высота фона = высоте букв, без лишнего
       красного сверху/снизу (у инлайн-фона она = полной высоте шрифта). */
    display: inline-block;
    background: var(--accent);
    color: var(--accent-contrast);
    padding: 0.06em 0.22em;
    line-height: 0.9;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.hero__subtitle {
    max-width: 40rem;
    margin: 0 auto 1.75rem;
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    line-height: 1.6;
    color: var(--text-muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-head);
    font-weight: 900;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-cta--primary {
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: var(--glow);
}

.hero-cta--primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.hero-cta--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-soft);
}

.hero-cta--ghost:hover {
    border-color: var(--border);
    background: var(--surface-2);
}

/* Декоративные эмодзи по углам */
.hero__deco {
    position: absolute;
    z-index: 1;
    font-size: clamp(4rem, 12vw, 9rem);
    line-height: 1;
    opacity: 0.06;
    pointer-events: none;
    user-select: none;
}

.hero__deco--tl { top: -1rem; left: -0.5rem; transform: rotate(-15deg); }
.hero__deco--br { bottom: -1.5rem; right: -0.5rem; transform: rotate(12deg); }

/* --- ACID-вид hero --- */
[data-theme="acid"] .hero {
    border-color: var(--border);
    box-shadow: var(--glow), inset 0 0 60px rgba(57, 255, 20, 0.06);
    background:
        radial-gradient(circle at 18% 20%, rgba(138, 43, 226, 0.30), transparent 42%),
        radial-gradient(circle at 82% 85%, rgba(255, 0, 255, 0.18), transparent 42%),
        var(--surface);
}

/* Заголовок hero в acid — тот же Russo One + неон, как у лого в навбаре */
[data-theme="acid"] .hero__title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 7vw, 4.2rem);
    line-height: 1.05;
    color: var(--accent);
    text-shadow: 3px 3px 0 var(--accent-2), 0 0 14px var(--accent);
}

[data-theme="acid"] .hero__title .hl {
    background: transparent;
    color: var(--accent-2);
    padding: 0;
    text-shadow: 3px 3px 0 var(--accent), 0 0 14px var(--accent-2);
}

/* ==========================================================================
   ЗАГОЛОВКИ СЕКЦИЙ (ТОП / ОТЗЫВЫ / КАТАЛОГ): шрифт темы,
   в acid — неон в стиле лого навбара.
   ========================================================================== */
.section-title {
    font-family: var(--font-head);
}

[data-theme="acid"] .section-title {
    color: var(--accent);
    text-shadow: 2px 2px 0 var(--accent-2), 0 0 12px var(--accent);
}

[data-theme="acid"] .hero__deco {
    opacity: 0.14;
    filter: drop-shadow(0 0 8px var(--accent));
}

/* ==========================================================================
   БЛОГ-ОКНО (hero--feed): трансляция постов из TG-канала в раме hero.
   Один пост крупно + стрелки/точки. Заполняется JS-ом (feedRender).
   ========================================================================== */
.hero--feed {
    text-align: left;
    padding: clamp(1.5rem, 3.5vw, 2.75rem) clamp(1.5rem, 4vw, 3.25rem);
}

.feed-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feed-head__label {
    color: var(--text);
}

.feed-head__tg {
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.feed-head__tg:hover {
    text-decoration: underline;
}

.feed-stage {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.5vw, 26px);
}

.feed-nav {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.feed-nav:hover {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
}

.feed-post {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: clamp(20px, 3vw, 38px);
    transition: opacity 0.14s ease;
}

.feed-post__media {
    flex-shrink: 0;
    width: clamp(140px, 26%, 240px);
    aspect-ratio: 1 / 1;
    border: 2px solid var(--border);
    background: var(--bg);
    overflow: hidden;
}

.feed-post__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-post__body {
    flex: 1;
    min-width: 0;
}

.feed-post__title {
    margin-bottom: 0.85rem;
    font-family: var(--font-head);
    font-weight: 900;
    font-size: clamp(1.1rem, 3.5vw, 1.8rem);
    line-height: 1.25;
    text-transform: uppercase;
    color: var(--text);
}

.feed-post__text {
    margin-bottom: 1.1rem;
    font-size: clamp(0.85rem, 2vw, 0.98rem);
    line-height: 1.65;
    color: var(--text-muted);
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Развёрнутый текст поста — снимаем обрезку */
.feed-post__text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* Кнопка «Читать полностью / Свернуть» */
.feed-more {
    display: inline-block;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-family: var(--font-head);
    font-weight: 900;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.feed-more:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.feed-post__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.75rem;
}

.feed-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
}

.feed-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: background 0.15s ease;
}

.feed-dot.active {
    background: var(--accent);
    border-color: var(--accent);
}

@media (max-width: 640px) {
    /* Стрелки НЕ поверх текста: пост на всю ширину, стрелки переносятся
       вниз по краям (под постом, над точками) */
    .feed-stage {
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .feed-post {
        order: -1;
        flex-basis: 100%;
        flex-direction: column;
    }

    .feed-nav {
        width: 44px;
        height: 34px;
    }

    .feed-nav:last-child { margin-left: auto; }

    .feed-post__media {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}

/* --- ACID-вид блога --- */
[data-theme="acid"] .feed-head {
    border-bottom-color: var(--border-soft);
}

[data-theme="acid"] .feed-head__label {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent);
}

[data-theme="acid"] .feed-post__title {
    color: var(--accent);
    text-shadow: 2px 2px 0 var(--accent-2), 0 0 12px var(--accent);
}

[data-theme="acid"] .feed-nav:hover {
    box-shadow: 0 0 12px var(--accent);
}

[data-theme="acid"] .feed-dot.active {
    box-shadow: 0 0 8px var(--accent);
}

/* ==========================================================================
   КАТАЛОГ: панель переключения вида
   ========================================================================== */
.view-controls {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border: 2px solid var(--border-soft);
    border-radius: var(--radius-card);
    background: var(--surface-2);
}

.view-controls button {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid transparent;
    border-radius: calc(var(--radius-card) - 3px);
    padding: 6px 12px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}

.view-controls button:hover {
    color: var(--text);
}

.view-controls button.active {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--border);
    box-shadow: var(--glow);
}

/* ==========================================================================
   КАТАЛОГ: системная строка над сеткой (LAVKA_CORE // ...)
   ========================================================================== */
.catalog-sysbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 14px;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #111111;
    color: #f4f3ef;
    border: 2px solid var(--border);
}

.catalog-sysbar__status {
    color: #39ff14;
}

[data-theme="acid"] .catalog-sysbar {
    background: var(--surface-2);
    color: var(--text);
    box-shadow: var(--glow);
}

[data-theme="acid"] .catalog-sysbar__status {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent);
}

/* ==========================================================================
   КАТАЛОГ: бесшовная «матрица» (shaman26_acid_purple_matrix.html).
   Плитки впритык (gap 0), общие рамки: контейнер 2px + outline 1px у ячеек.
   --matrix-line — цвет внутренних линий (в acid приглушается alpha).
   Дефолт — адаптивный; grid-N / list-view — выбор юзера. Порядок важен:
   фиксированные grid-N идут ПОСЛЕ медиазапросов.
   ========================================================================== */
.catalog-grid {
    --matrix-line: var(--border);
    display: grid;
    gap: 0;
    grid-template-columns: repeat(2, 1fr);
    border: 2px solid var(--matrix-line);
    background: var(--surface);
}

@media (min-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.catalog-grid.grid-1 { grid-template-columns: 1fr; }
.catalog-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.catalog-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.catalog-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
.catalog-grid.list-view { grid-template-columns: 1fr; }

/* Скрытие карточек фильтром (.hidden) ДОЛЖНО побеждать display:flex плитки */
.product-card.hidden,
.tile.hidden {
    display: none !important;
}

/* ==========================================================================
   КАТАЛОГ: плитка-«модуль»
   Структура: tile-head (ID+категория) → tile-media (фото-бокс) →
   tile-body (название [+описание для списка]) → tile-ctrls (статус-бар,
   цена + [+]).
   ========================================================================== */
.product-card.tile {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: var(--surface);
    outline: 1px solid var(--matrix-line);
    outline-offset: -1px;
    padding: clamp(8px, 1.3vw, 14px);
    position: relative;
    z-index: 1;
    transition: background-color 0.15s ease, outline-color 0.15s ease, box-shadow 0.15s ease;
}

.product-card.tile:hover {
    z-index: 2;
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    /* Свечение акцентом и в светлой теме — «на манер тёмной» (в acid своё, ярче) */
    box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 75%, transparent);
}

.tile-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.tile-id {
    color: var(--text-muted);
    border-bottom: 1px dashed var(--matrix-line);
    white-space: nowrap;
}

.tile-cat {
    text-transform: uppercase;
    color: var(--accent);
    text-align: right;
}

.product-card.tile:hover .tile-cat {
    color: var(--text);
}

.tile-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--bg);
    border: 1px solid var(--matrix-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    container-type: inline-size;
    margin-bottom: 8px;
}

.product-card.tile:hover .tile-media {
    border-color: var(--accent);
}

.tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card.tile:hover .tile-img {
    transform: scale(1.05);
}

.tile-emoji {
    font-size: clamp(3rem, 30cqi, 7rem);
    line-height: 1;
    filter: drop-shadow(2px 4px 0 rgba(0, 0, 0, 0.25));
    transition: transform 0.2s ease;
}

.product-card.tile:hover .tile-emoji {
    transform: scale(1.08) rotate(4deg);
}

.tile-rating {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border: 1px solid var(--border);
    background: var(--accent);
    color: var(--accent-contrast);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.5;
}

.tile-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.tile-title {
    font-family: var(--font-head);
    font-size: clamp(0.8rem, 2.2cqi + 0.5rem, 0.95rem);
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    text-align: center;
    color: var(--text);
    min-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Описание видно только в режиме реестра (list-view) */
.tile-desc {
    display: none;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.tile-ctrls {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed var(--matrix-line);
}

.product-card.tile:hover .tile-ctrls {
    border-top-style: solid;
    border-top-color: var(--accent);
}

/* Статус-бар «МОДУЛЬ|READY / ХИТ|POPULAR / АУТЕНТ|REQ_AUTH» */
.tile-status-bar {
    display: flex;
    margin-bottom: 6px;
    border: 1px solid var(--matrix-line);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
}

.status-left {
    width: 50%;
    padding: 3px 0;
    background: var(--surface-2);
    color: var(--text-muted);
}

.status-right {
    width: 50%;
    padding: 3px 0;
    background: var(--surface);
    color: var(--text);
    border-left: 1px solid var(--matrix-line);
}

/* Топ-фасовки вместо «МОДУЛЬ/READY»: тап = сразу в корзину */
.tile-var {
    flex: 1 1 0;
    min-width: 0;
    padding: 3px 4px;
    background: var(--surface-2);
    border: none;
    border-left: 1px solid var(--matrix-line);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tile-var:first-child {
    border-left: none;
}

.tile-var:hover,
.tile-var.is-added {
    background: var(--accent);
    color: var(--accent-contrast);
}

.product-card.is-hit .status-left {
    background: var(--accent);
    color: var(--accent-contrast);
}

.product-card.is-auth .status-left {
    background: var(--text);
    color: var(--bg);
}

.tile-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tile-price {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.tile-price__from {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-right: 2px;
}

.tile-cta {
    flex-shrink: 0;
    padding: 3px 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.15s ease;
}

/* Подпись кнопки: [+] в плитках, + КОРЗ в реестре */
.tile-cta .cta-list { display: none; }

/* Мгновенный отклик [+]: товар улетел в корзину */
.tile-cta.is-added {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
}

.product-card.tile:hover .tile-cta {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
}

/* ==========================================================================
   КАТАЛОГ: режим «инженерный реестр» (list-view,
   по shaman26_full_catalog_spec.pdf): строки ID | фото | название+описание |
   статус + цена + [+КОРЗ]
   ========================================================================== */
.catalog-grid.list-view .product-card.tile {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    outline: none;
    border-bottom: 1px solid var(--matrix-line);
}

.catalog-grid.list-view .product-card.tile:last-child {
    border-bottom: none;
}

.catalog-grid.list-view .product-card.tile:hover {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.catalog-grid.list-view .tile-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 84px;
    flex-shrink: 0;
    margin-bottom: 0;
}

.catalog-grid.list-view .tile-cat {
    text-align: left;
    padding: 1px 5px;
    border: 1px solid var(--matrix-line);
    color: var(--text-muted);
}

.catalog-grid.list-view .tile-media {
    width: 64px;
    flex-shrink: 0;
    margin-bottom: 0;
}

.catalog-grid.list-view .tile-rating {
    display: none;
}

.catalog-grid.list-view .tile-body {
    flex: 1;
    min-width: 0;
}

.catalog-grid.list-view .tile-title {
    text-align: left;
    min-height: auto;
}

.catalog-grid.list-view .tile-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-grid.list-view .tile-ctrls {
    width: 140px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border-top: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.catalog-grid.list-view .product-card.tile:hover .tile-ctrls {
    border: none;
}

.catalog-grid.list-view .tile-status-bar {
    margin-bottom: 0;
}

.catalog-grid.list-view .tile-foot {
    justify-content: space-between;
}

.catalog-grid.list-view .tile-cta .cta-list { display: inline; }
.catalog-grid.list-view .tile-cta .cta-grid { display: none; }

@media (max-width: 640px) {
    .catalog-grid.list-view .product-card.tile {
        flex-wrap: wrap;
        gap: 10px;
    }

    .catalog-grid.list-view .tile-head {
        order: -1;
        flex-basis: 100%;
        width: auto;
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
    }

    .catalog-grid.list-view .tile-media {
        width: 56px;
    }

    .catalog-grid.list-view .tile-body {
        flex: 1 1 calc(100% - 80px);
    }

    .catalog-grid.list-view .tile-ctrls {
        width: 100%;
        flex-direction: row-reverse;
        align-items: center;
    }

    .catalog-grid.list-view .tile-status-bar {
        flex: 1;
    }

    .catalog-grid.list-view .tile-foot {
        flex: 1;
    }
}

/* ==========================================================================
   ACID-СПЕЦИФИКА (матрица)
   ========================================================================== */
/* Внутренние линии матрицы в acid приглушаем, чтобы сетка не «кричала» */
[data-theme="acid"] .catalog-grid {
    --matrix-line: rgba(57, 255, 20, 0.45);
    border-color: rgba(57, 255, 20, 0.65);
}

[data-theme="acid"] .tile-title {
    letter-spacing: 0.02em;
    text-shadow: 1px 1px 0 #000;
}

[data-theme="acid"] .product-card.tile {
    background:
        linear-gradient(160deg, rgba(138, 43, 226, 0.12), transparent 60%),
        var(--surface);
}

[data-theme="acid"] .product-card.tile:hover {
    outline-color: var(--accent);
    box-shadow:
        0 0 22px var(--accent),
        inset 0 0 24px rgba(57, 255, 20, 0.12);
}

[data-theme="acid"] .product-card.tile:hover .tile-title {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

[data-theme="acid"] .product-card.tile:hover .tile-emoji {
    transform: scale(1.12) rotate(5deg);
    filter: drop-shadow(0 0 10px var(--accent));
}

[data-theme="acid"] .tile-media {
    background: var(--bg);
}

[data-theme="acid"] .tile-rating {
    box-shadow: 0 0 10px var(--accent);
}

[data-theme="acid"] .product-card.is-auth .status-left {
    background: var(--accent-2);
    color: #ffffff;
}

[data-theme="acid"] .product-card.tile:hover .tile-cta {
    box-shadow: 0 0 12px var(--accent);
}

/* Активная плитка-вид: неоновое свечение */
[data-theme="acid"] .view-controls {
    border-color: var(--border-soft);
}

[data-theme="acid"] .view-controls button.active {
    text-shadow: none;
    box-shadow: 0 0 12px var(--accent);
}

/* ==========================================================================
   БЫСТРОЕ ДОБАВЛЕНИЕ: мини-корзина снизу (Ozon-style) + шторка выбора фасовки.
   Появляются после [+] на плитке. Токены тем — работает в «бумаге» и acid.
   ========================================================================== */
.quick-cart-bar {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translate(-50%, calc(100% + 40px));
    width: min(560px, calc(100vw - 16px));
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom) * 0.4);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-card, 12px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
    z-index: 58;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}

.quick-cart-bar.open {
    transform: translate(-50%, 0);
}

.quick-cart-bar__info {
    flex: 1;
    /* Минимум под имя — иначе степпер и кнопка сжимают его в ноль на 360-390px */
    min-width: 76px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-cart-bar__name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-cart-bar__sum {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-cart-bar__stepper {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 2px;
}

.quick-cart-bar__stepper button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.quick-cart-bar__stepper button:hover:not(:disabled) {
    background: var(--accent);
    color: var(--accent-contrast);
}

.quick-cart-bar__stepper button:disabled {
    opacity: 0.3;
    cursor: default;
}

.quick-cart-bar__stepper span {
    min-width: 22px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
}

.quick-cart-bar__go {
    flex-shrink: 0;
    padding: 9px 10px;
    background: var(--accent);
    color: var(--accent-contrast);
    border: 2px solid var(--border);
    border-radius: var(--radius, 8px);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-decoration: none;
    transition: filter 0.15s ease;
}

.quick-cart-bar__go:hover {
    filter: brightness(1.08);
}

.quick-cart-bar__close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 900;
    cursor: pointer;
}

.quick-cart-bar__close:hover {
    color: var(--text);
}

[data-theme="acid"] .quick-cart-bar {
    box-shadow: 0 0 22px var(--accent), 0 10px 32px rgba(0, 0, 0, 0.4);
}

.quick-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 59;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.quick-sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.quick-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--surface);
    border-top: 2px solid var(--border);
    border-radius: 18px 18px 0 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
    transform: translateY(105%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.05);
}

.quick-sheet.open {
    transform: none;
}

.quick-sheet__grab {
    width: 44px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-soft);
    margin: 0 auto 12px;
}

.quick-sheet__title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text);
    text-align: center;
}

.quick-sheet__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.quick-sheet__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    background: var(--surface);
    border: 2px solid var(--border-soft);
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.quick-sheet__item:hover {
    border-color: var(--accent);
}

.quick-sheet__item:active {
    background: var(--surface-2);
}

.quick-sheet__price {
    font-family: var(--font-mono);
    font-weight: 800;
    white-space: nowrap;
}

[data-theme="acid"] .quick-sheet {
    box-shadow: 0 -8px 30px rgba(57, 255, 20, 0.18);
}

/* Десктоп: бар — по центру внизу, чуть крупнее мобильного; шторка — компактная
   центрированная карточка вместо полосы во всю ширину экрана. */
@media (min-width: 768px) {
    .quick-cart-bar {
        bottom: 24px;
        width: min(680px, calc(100vw - 32px));
        padding: 14px 16px;
        gap: 12px;
    }

    .quick-cart-bar__name {
        font-size: 0.92rem;
    }

    .quick-cart-bar__sum {
        font-size: 0.8rem;
    }

    .quick-cart-bar__stepper button {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .quick-cart-bar__stepper span {
        min-width: 28px;
        font-size: 1.05rem;
    }

    .quick-cart-bar__go {
        font-size: 0.82rem;
        padding: 12px 18px;
    }

    .quick-cart-bar__close {
        width: 28px;
        height: 28px;
    }

    .quick-sheet {
        left: 50%;
        right: auto;
        bottom: 48px;
        width: 440px;
        max-height: 60vh;
        border: 2px solid var(--border);
        border-radius: 18px;
        padding: 16px 20px 20px;
        transform: translate(-50%, calc(100% + 80px));
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    }

    .quick-sheet.open {
        transform: translate(-50%, 0);
    }

    /* Ручка-полоска — тач-аффорданс, на десктопе не нужна */
    .quick-sheet__grab {
        display: none;
    }

    [data-theme="acid"] .quick-sheet {
        box-shadow: 0 0 26px rgba(57, 255, 20, 0.3), 0 16px 48px rgba(0, 0, 0, 0.45);
    }
}

/* Пока открыта мини-корзина/шторка — прячем плавающую «?» (z-index 380),
   иначе она перекрывает крестик и кнопки бара на мобилке. */
body.quick-cart-open .nav-guest-hint-fab {
    opacity: 0;
    pointer-events: none;
}

/* Фолбэк-тост для страниц без глобального #toast-notification */
.quick-toast {
    position: fixed;
    left: 50%;
    bottom: 84px;
    transform: translate(-50%, 16px);
    background: var(--text);
    color: var(--bg);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    z-index: 70;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: calc(100vw - 32px);
}

.quick-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==========================================================================
   ФУТЕР — намеренно тёмная панель. В белой теме тёмный (бренд),
   в acid — фиолетовая поверхность с неон-акцентом.
   ========================================================================== */
.site-footer {
    background: #111111;
    color: #e5e7eb;
    border-top: 8px solid var(--accent);
}

.site-footer__head {
    color: var(--accent);
}

.site-footer__link {
    color: #9ca3af;
    transition: color 0.2s ease;
}

.site-footer__link:hover {
    color: #ffffff;
}

.site-footer__muted {
    color: #6b7280;
}

[data-theme="acid"] .site-footer {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 -2px 18px rgba(57, 255, 20, 0.12);
}

[data-theme="acid"] .site-footer__link {
    color: var(--text-muted);
}

[data-theme="acid"] .site-footer__link:hover {
    color: var(--accent);
}

[data-theme="acid"] .site-footer__muted {
    color: var(--text-muted);
}

/* ==========================================================================
   НАВБАР — acid-лого (Press Start 2P нет кириллицы → берём Russo One + неон)
   ========================================================================== */
[data-theme="acid"] .nav-brand {
    font-family: var(--font-head);
    color: var(--accent);
    letter-spacing: 0.02em;
    text-shadow: 2px 2px 0 var(--accent-2), 0 0 12px var(--accent);
}

[data-theme="acid"] .nav-brand:hover {
    color: var(--accent-2);
    text-shadow: 2px 2px 0 var(--accent), 0 0 14px var(--accent-2);
}

[data-theme="acid"] .nav-logo-img {
    box-shadow: 0 0 14px var(--accent);
}
