﻿/* ШвейГид — основные стили (токены: design-tokens.css) */

html {
    scroll-behavior: smooth;
}

body.hyper-site,
body[data-template="hypercat"] {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    background-color: var(--color-bg-page);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: var(--transition-theme);
}

html[data-theme="dark"] body.hyper-site,
html[data-theme="dark"] body[data-template="hypercat"] {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--accent-rgb) / 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(var(--accent-secondary-rgb) / 0.12), transparent);
}

/* Glass — одинаковая геометрия в обеих темах */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

/* Header */
.hyper-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    flex-shrink: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--shadow-header);
    transition: var(--transition-theme);
}

.hyper-topbar {
    display: block;
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-default);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.hyper-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 2.5rem;
    min-width: 0;
}

.hyper-topbar__start {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
    flex: 1 1 0;
    overflow: visible;
}

.hyper-topbar__nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.hyper-topbar__nav .hc-topbar-menu__trigger {
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-secondary);
    white-space: nowrap;
    text-decoration: none;
}

.hyper-topbar__nav .hc-topbar-menu__trigger.is-active,
.hyper-topbar__nav .hc-topbar-menu.is-open .hc-topbar-menu__trigger,
.hyper-topbar__nav .hc-topbar-menu:focus-within .hc-topbar-menu__trigger {
    color: var(--accent-primary);
}

.hyper-topbar__nav .hc-topbar-menu__panel {
    min-width: 16rem;
}

.hc-topbar-menu__item--emphasis {
    font-weight: 600;
}

.hyper-topbar__benefits {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 0 1 auto;
    overflow: visible;
}

.hyper-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
    margin-left: auto;
    max-width: 100%;
}

.hyper-topbar__actions .hc-currency-rates {
    margin-right: 0.15rem;
}

.hyper-topbar__nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.hyper-topbar__nav-link:hover {
    color: var(--text-primary);
}

.hyper-topbar__nav-link.is-active {
    color: var(--accent-primary);
}

.hyper-topbar__phone {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.hyper-topbar__callback {
    font-weight: 500;
    color: var(--accent-cta);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
}

.hyper-topbar__callback:hover {
    color: var(--accent-cta-hover);
}

/* legacy: совместимость со старыми разметками */
.hyper-header > .mx-auto {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding: 0.75rem 1rem;
}

.hc-header-center .hc-header-search-wrap,
.hc-header-row .hc-header-search-wrap {
    flex: 1 1 auto;
    width: 100%;
    min-width: 12rem;
    max-width: min(36rem, 100%);
}

.hc-header-nav {
    display: none;
}

@media (min-width: 1280px) {
    .hc-header-nav {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
}

.hc-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.hc-nav-link:hover,
.hc-nav-link.is-active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

body[data-template="hypercat"] main.hyper-main {
    flex: 1 0 auto;
    padding-top: 0;
    position: relative;
    z-index: 0;
}

body[data-template="hypercat"] footer.hyper-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    background: var(--footer-bg);
    border-top: 1px solid var(--header-border);
    color: var(--footer-text);
    transition: var(--transition-theme);
}

.hyper-footer a {
    color: var(--footer-text);
    transition: color var(--transition-base);
}

.hyper-footer a:hover {
    color: var(--footer-text-hover);
}

.hyper-footer__heading {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--footer-text-hover);
}

.hyper-footer__text {
    font-size: var(--text-sm);
    color: var(--footer-text);
    line-height: var(--leading-relaxed);
}

.hyper-footer__legal {
    margin: 0;
    max-width: 42rem;
    font-size: var(--text-xs);
    color: var(--footer-text);
    line-height: var(--leading-relaxed);
    opacity: 0.85;
}

.hyper-footer__disclaimer {
    margin: 0.5rem 0 0;
    max-width: 42rem;
    font-size: var(--text-xs);
    color: var(--footer-text);
    line-height: var(--leading-relaxed);
    opacity: 0.75;
}

.hyper-footer__link {
    font-size: var(--text-sm);
    color: var(--footer-text);
}

.hyper-footer__link--btn {
    display: inline;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color var(--transition-base);
}

.hyper-footer__link--btn:hover {
    color: var(--footer-text-hover);
}

.hyper-footer__list {
    list-style: none;
    margin: 0.875rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hyper-footer__grid {
    display: grid;
    gap: 2rem 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .hyper-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .hyper-footer__grid {
        grid-template-columns: 1.1fr repeat(5, minmax(0, 1fr));
        gap: 1.5rem 1.25rem;
    }
}

.hyper-footer__brand {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .hyper-footer__brand {
        grid-column: auto;
        grid-row: span 1;
    }
}

.hyper-footer__cta {
    width: 100%;
    max-width: 16rem;
    justify-content: center;
}

.hyper-footer__address {
    margin: 0.75rem 0 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--footer-text);
    opacity: 0.85;
}

.hyper-footer__link--emphasis {
    color: var(--footer-text-hover);
    font-weight: var(--font-medium);
}

.hyper-footer__divider {
    border-top: 1px solid var(--header-border);
}

.hyper-footer__bottom {
    font-size: var(--text-sm);
    color: var(--footer-text);
    opacity: 0.85;
}

/* Подписка в подвале */
.hyper-footer .hc-subscribe--footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--header-border);
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__inner {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .hyper-footer .hc-subscribe--footer .hc-subscribe__inner {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 26rem);
        align-items: center;
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .hyper-footer .hc-subscribe--footer .hc-subscribe__inner {
        grid-template-columns: 1.15fr minmax(320px, 28rem);
        gap: 3rem;
    }
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__title {
    margin: 0 0 0.35rem;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--footer-text-hover);
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__text {
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--footer-text);
    opacity: 0.92;
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__input {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--footer-text-hover);
    font-size: var(--text-sm);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__input::placeholder {
    color: var(--footer-text);
    opacity: 0.75;
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__status {
    margin: 0.5rem 0 0;
    width: 100%;
    font-size: var(--text-xs);
    color: var(--footer-text);
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__status.is-success {
    color: #4ade80;
}

.hyper-footer .hc-subscribe--footer .hc-subscribe__status.is-error {
    color: #f87171;
}

body.adm-header-fixed .hyper-header {
    top: 39px;
}

.glow {
    box-shadow: var(--shadow-md);
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}

.text-gradient {
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

html[data-theme="dark"] .text-gradient {
    background: var(--text-accent-gradient, linear-gradient(135deg, #fca5a5 0%, #ef4444 100%));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html[data-theme="light"] .text-gradient {
    color: var(--color-text-primary);
}

.font-display {
    font-family: var(--font-display);
}

.font-mono-article {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

/* Theme toggle */
.hc-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.hc-theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.hc-theme-toggle--header {
    display: none;
}

@media (min-width: 640px) {
    .hc-theme-toggle--header {
        display: inline-flex;
    }
}

.hc-theme-toggle__icon--light {
    display: none;
}

html[data-theme="light"] .hc-theme-toggle__icon--dark {
    display: none;
}

html[data-theme="light"] .hc-theme-toggle__icon--light {
    display: block;
}

.hyper-footer__theme {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hyper-footer__theme-label {
    font-size: var(--text-sm);
    color: var(--footer-text);
    opacity: 0.85;
}

/* Скроллбар */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-hover);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--bg-hover);
}

*::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: var(--radius-full);
}

/* Карточка товара */
.product-card,
.hyper-card.product-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-slow), border-color var(--transition-slow), box-shadow var(--transition-slow);
}

.product-card,
.hyper-card.product-card {
    box-shadow: var(--shadow-sm);
}

.product-card:hover,
.hyper-card.product-card:hover {
    border-color: var(--color-card-hover-border);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* Кнопки */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-text-on-accent, #fff);
    border: none;
    cursor: pointer;
    transition: var(--transition-theme), transform var(--transition-fast);
    /* Жёсткий бренд-красный: не зависит от кэша CSS-переменных / PageSpeed */
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    background-image: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    box-shadow: 0 1px 2px rgba(185, 28, 28, 0.28);
}

html[data-theme="light"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%) !important;
    background-image: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%) !important;
    box-shadow: 0 4px 16px rgba(185, 28, 28, 0.4);
    transform: translateY(-1px);
}

html[data-theme="dark"] .btn-primary {
    --tw-gradient-from: initial;
    --tw-gradient-to: initial;
    --tw-gradient-stops: initial;
}

html[data-theme="dark"] * {
    scrollbar-color: var(--accent-cta) var(--bg-hover);
}

html[data-theme="dark"] *::-webkit-scrollbar-thumb {
    background: var(--accent-cta);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-surface-solid);
    border: 1px solid var(--border-input);
    transition: background var(--transition-base), border-color var(--transition-base);
    text-decoration: none;
}

a.btn-secondary:hover,
a.btn-primary:hover {
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-tertiary);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    color: var(--text-secondary);
    transition: border-color var(--transition-base), background var(--transition-base), color var(--transition-base);
}

.btn-ghost:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: #fef2f2;
    color: var(--accent-cta);
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fee2e2;
}

/* Инпуты */
.hc-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.hc-input::placeholder {
    color: var(--text-tertiary);
}

.hc-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-cta) 12%, transparent);
}

/* Бейджи */
.badge-success {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.625rem;
    border-radius: var(--radius-full);
}

.badge-warning {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.625rem;
    border-radius: var(--radius-full);
}

/* Анимации */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-skeleton {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fade-in 0.35s ease forwards;
}

.skeleton {
    animation: pulse-skeleton 2s infinite;
}

[data-mobile-drawer].is-open {
    transform: translateX(0);
}

[data-mobile-overlay].is-open {
    display: block;
}

.catalog-table-view .product-card {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 767px) {
    :root {
        --header-offset: calc(var(--topbar-height) + var(--header-height-mobile) + 3rem);
    }

    .catalog-table-view .product-card {
        grid-template-columns: 1fr;
    }
}

/* Bitrix breadcrumbs */
.bx-breadcrumb,
.bx-breadcrumb a {
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
}

.bx-breadcrumb a:hover {
    color: var(--accent-primary) !important;
}

.smart-filter .bx-filter-param-label {
    color: var(--text-secondary);
}

body[data-template="hypercat"] .hyper-header svg,
body[data-template="hypercat"] button svg {
    width: 1.25rem;
    height: 1.25rem;
    max-width: 1.25rem;
    max-height: 1.25rem;
    flex-shrink: 0;
}

body[data-template="hypercat"] .hc-category-grid .catalog-section-list,
body[data-template="hypercat"] .hc-home-section--categories .catalog-section-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.5rem;
}

body[data-template="hypercat"] .hc-category-grid .catalog-section-list a,
body[data-template="hypercat"] .hc-home-section--categories .catalog-section-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

body[data-template="hypercat"] .hc-category-grid .catalog-section-list a:hover,
body[data-template="hypercat"] .hc-home-section--categories .catalog-section-list a:hover {
    color: var(--accent-primary);
}

/* Typography scale (light theme utilities) */
.hc-h1 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hc-h2 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hc-price {
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Цена целиком и знак ₽ — без переноса на новую строку */
.hyper-card__price,
.hyper-card__price-old,
.hyper-section-table__price,
.hyper-buy__price-current,
.hyper-buy__price-old,
.hyper-live-search__price,
.hyper-cart-table__sum,
.hc-checkout__total-row dd,
td[data-label="Цена"],
td[data-label="Сумма"] {
    white-space: nowrap;
}

/* Phosphor icons */
.ph,
i.ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    vertical-align: middle;
    flex-shrink: 0;
    speak: never;
    -webkit-font-smoothing: antialiased;
}

.ph-icon,
.ph.ph-icon {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

/* Игнорировать Tailwind w-/h- на иконках-шрифтах */
.ph-icon[class*="w-"],
.ph-icon[class*="h-"] {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.hyper-tabbar__icon.ph-icon {
    font-size: 1.375rem;
}

.ph-icon--sm,
.ph.ph-icon--sm {
    font-size: 1rem;
}

.ph-icon--xl,
.ph.ph-icon--xl {
    font-size: 2.5rem;
}

/* Mobile tab bar */
@media (max-width: 1023px) {
    body[data-template="hypercat"] {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }
}

.hyper-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

.hyper-tabbar__inner {
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.25rem;
    border-radius: 1rem;
    padding: 0.35rem 0.25rem;
    background: var(--header-bg);
    border: 1px solid var(--color-border-default);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
}

.hyper-tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.3rem 0.1rem;
    font-size: 0.5625rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: color 0.15s ease, background 0.15s ease;
}

.hyper-tabbar__item.is-active,
.hyper-tabbar__item:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    background-image: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
}

.hyper-tabbar__icon-wrap {
    position: relative;
    display: inline-flex;
}

.hyper-tabbar__badge {
    position: absolute;
    top: -0.35rem;
    right: -0.45rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #dc2626 !important;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1rem;
    text-align: center;
}

.hyper-tabbar__badge:not(.hidden) {
    display: inline-block;
}

/* SKU selector (product card) */
.hyper-sku {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hyper-sku__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.hyper-sku__values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.hyper-sku__btn {
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.hyper-sku__btn:hover {
    border-color: rgba(var(--accent-rgb) / 0.45);
}

.hyper-sku__btn.is-active {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb) / 0.15);
    color: #fff;
}

.hyper-sku__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Блог */
.hc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Фильтр по тегам */
.hc-blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.hc-blog-chip {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--color-border-default);
    background: var(--color-bg-surface);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.hc-blog-chip:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.hc-blog-chip.is-active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.hc-blog-chip--static {
    cursor: default;
}

/* Сетка карточек */
.hc-blog-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .hc-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .hc-blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.hc-blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-default);
    background: var(--color-bg-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-slow), box-shadow var(--transition-slow), transform var(--transition-slow);
}

.hc-blog-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

.hc-blog-card__media {
    display: block;
    aspect-ratio: 1200 / 630;
    overflow: hidden;
    background: var(--bg-secondary);
}

.hc-blog-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hc-blog-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem 1.35rem;
}

.hc-blog-card__tag {
    align-self: flex-start;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--accent-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hc-blog-card__title {
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.hc-blog-card__excerpt {
    flex: 1 1 auto;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.hc-blog-card__more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-secondary);
}

.hc-blog-empty {
    margin-top: 1.5rem;
    color: var(--text-tertiary);
}

/* Детальная статья */
.hc-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hc-back-link:hover {
    color: var(--color-accent);
}

.hc-article {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-default);
    background: var(--color-bg-surface);
}

.hc-article__cover-wrap {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-default);
    background: var(--color-bg-surface);
}

.hc-article__cover-link {
    display: block;
}

.hc-article__cover {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-bottom: 1px solid var(--color-border-default);
}

@media (min-width: 768px) {
    .hc-article__cover {
        max-height: 340px;
    }
}

.hc-article__body {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .hc-article__body {
        padding: 2.25rem 2.75rem;
    }
}

.hc-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.hc-article__h1 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.hc-article__date {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.hc-article__content {
    margin-top: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.hc-article__content h2 {
    margin-top: 1.6rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hc-article__content p {
    margin-bottom: 0.85rem;
}

.hc-article__content ul {
    margin: 0.5rem 0 0.9rem 1.25rem;
    list-style: disc;
}

.hc-article__content li {
    margin-bottom: 0.4rem;
}

.hc-article__content a {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* CTA — единый премиум-блок (главная, статьи и т.д.) */
.hc-cta {
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.85rem 1.6rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #111827 0%, #1f2a40 100%);
    color: #fff;
}

.hc-cta::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.38), transparent 70%);
    pointer-events: none;
}

@media (min-width: 768px) {
    .hc-cta {
        flex-direction: row;
        align-items: center;
        gap: 1.75rem;
        padding: 2.25rem 2.5rem;
    }
}

.hc-cta__icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    border-radius: 14px;
    background: rgba(220, 38, 38, 0.16);
    color: #f87171;
    font-size: 1.6rem;
}

.hc-cta__text {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
}

.hc-cta__title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.375rem;
    line-height: 1.3;
    color: #fff;
}

.hc-cta__lead {
    margin-top: 0.45rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.hc-cta__actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex-shrink: 0;
}

.hc-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.hc-cta__btn--primary {
    background: var(--color-accent);
    color: #fff;
}

.hc-cta__btn--primary:hover {
    background: var(--color-accent-hover, #b91c1c);
    transform: translateY(-1px);
}

.hc-cta__btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}

.hc-cta__btn--ghost:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 480px) {
    .hc-cta__actions {
        width: 100%;
    }

    .hc-cta__btn {
        flex: 1 1 100%;
    }
}

/* ─── Блок отзывов ──────────────────────────────────── */
.hc-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.hc-review-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: var(--radius-xl, 1rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    transition: box-shadow 0.2s;
}

.hc-review-card:hover {
    box-shadow: 0 0 24px rgba(192, 38, 211, 0.12);
}

.hc-review-card__stars {
    display: flex;
    gap: 0.15rem;
    font-size: 1.1rem;
    line-height: 1;
}

.hc-review-card__star {
    color: rgba(255, 255, 255, 0.25);
}

.hc-review-card__star.is-filled {
    color: #FBBF24;
}

html[data-theme="light"] .hc-review-card__star { color: rgba(0, 0, 0, 0.15); }
html[data-theme="light"] .hc-review-card__star.is-filled { color: #D97706; }

.hc-review-card__text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.hc-review-card__footer {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hc-review-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text, #fff);
}

.hc-review-card__post {
    font-size: 0.75rem;
    color: var(--color-text-muted, rgba(255, 255, 255, 0.45));
}

/* Светлая тема */
[data-theme="light"] .hc-review-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .hc-review-card:hover {
    box-shadow: 0 0 24px rgba(192, 38, 211, 0.1);
}

[data-theme="light"] .hc-review-card__name {
    color: var(--color-text, #111827);
}

[data-theme="light"] .hc-review-card__post {
    color: var(--color-text-muted, #9ca3af);
}

[data-theme="light"] .hc-review-card__footer {
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hc-review-card__star {
    color: rgba(0, 0, 0, 0.15);
}

@media (max-width: 640px) {
    .hc-reviews-grid {
        grid-template-columns: 1fr;
    }
}

.hc-product-reviews {
    margin: 2rem 0 1rem;
}

.hc-product-reviews .hc-home-section__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.hc-product-reviews-cta {
    margin-top: 1rem;
}

/* Static page hero (вкл. область / режим правки) */
.hc-static-hero-edit:not(:has(img)) {
    display: none;
}

/* Пустая область видна только в режиме правки — чтобы добавить фото */
body.bx-edit-mode .hc-static-hero-edit:not(:has(img)) {
    display: block;
    margin: 0 0 1.5rem;
    min-height: 3.5rem;
    border: 1px dashed var(--color-border-default, #c5ccd6);
    border-radius: var(--radius-xl, 12px);
    background: var(--color-bg-surface, #f6f7f9);
}

.hc-static-hero-edit .hc-static-hero,
.hc-static-hero {
    margin: 0 0 1.5rem;
    border-radius: var(--radius-xl, 12px);
    overflow: hidden;
    border: 1px solid var(--color-border-default, var(--border-default, #d5dbe3));
    background: var(--color-bg-surface, var(--bg-surface, #f6f7f9));
}

.hc-static-hero-edit img,
.hc-static-hero img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}


.hc-static-hero-admin-hint {
    margin: -0.75rem 0 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--color-text-muted, #64748b);
}

.hc-static-hero-admin-hint a {
    color: var(--color-accent, #c026d3);
    text-decoration: underline;
}

html[data-theme="dark"] .hc-static-hero-edit .hc-static-hero,
html[data-theme="dark"] .hc-static-hero {
    border-color: var(--color-border-default, rgba(255, 255, 255, 0.12));
    background: var(--color-bg-surface, #111827);
}

/* IA section layout: aside + main */
.hc-ia-layout {
    display: grid;
    gap: 1.5rem 2rem;
    grid-template-columns: 1fr;
    align-items: start;
}

@media (min-width: 1024px) {
    .hc-ia-layout {
        grid-template-columns: 15rem minmax(0, 1fr);
    }
}

.hc-ia-aside {
    position: sticky;
    top: 5.5rem;
    padding: 1rem;
    border-radius: var(--radius-xl, 8px);
    background: var(--color-bg-surface, var(--bg-surface, #f6f7f9));
    border: 1px solid var(--color-border-default, var(--border-default, #d5dbe3));
    box-shadow: var(--shadow-sm, none);
}

.hc-ia-aside__title {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-tertiary, var(--text-tertiary, #64748b));
}

.hc-ia-aside__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hc-ia-aside__link {
    display: block;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    color: var(--color-text-secondary, var(--text-secondary, #475569));
    text-decoration: none;
    transition: background var(--transition-fast, 0.15s), color var(--transition-fast, 0.15s);
}

.hc-ia-aside__link:hover {
    background: var(--color-bg-hover, var(--bg-hover, #e3e7ed));
    color: var(--color-text-primary, var(--text-primary, #1e293b));
}

.hc-ia-aside__link.is-active {
    background: color-mix(in srgb, var(--color-accent, var(--accent-primary, #dc2626)) 12%, transparent);
    color: var(--color-text-primary, var(--text-primary, #1e293b));
    font-weight: 600;
}

html[data-theme="dark"] .hc-ia-aside {
    background: var(--color-bg-surface, #111827);
    border-color: var(--color-border-default, rgba(255, 255, 255, 0.12));
    box-shadow: none;
}

html[data-theme="dark"] .hc-ia-aside__title {
    color: var(--color-text-tertiary, #94a3b8);
}

html[data-theme="dark"] .hc-ia-aside__link {
    color: var(--color-text-secondary, #cbd5e1);
}

html[data-theme="dark"] .hc-ia-aside__link:hover {
    background: var(--color-bg-hover, rgba(255, 255, 255, 0.06));
    color: var(--color-text-primary, #f8fafc);
}

html[data-theme="dark"] .hc-ia-aside__link.is-active {
    background: color-mix(in srgb, var(--color-accent, #dc2626) 18%, transparent);
    color: var(--color-text-primary, #f8fafc);
}

@media (max-width: 1023px) {
    .hc-ia-aside {
        position: static;
        overflow-x: auto;
    }

    .hc-ia-aside__list {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.35rem;
        width: max-content;
        max-width: none;
    }

    .hc-ia-aside__link {
        white-space: nowrap;
    }
}

.hc-ia-tech-hero img,
.hc-ia-tech-card__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    object-fit: cover;
}

.hc-ia-tech-card__media {
    display: block;
    margin-bottom: 0.75rem;
    overflow: hidden;
    border-radius: 0.75rem;
    aspect-ratio: 16 / 9;
    background: color-mix(in srgb, var(--color-surface, #111) 80%, transparent);
}

.hc-ia-tech-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hc-ia-tech-related__title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.hc-ia-tech-related__list {
    margin: 0 0 0.75rem;
    padding-left: 1.1rem;
}
