@font-face {
    font-family: "Onest";
    src: url("../fonts/onest-400.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Onest";
    src: url("../fonts/onest-500.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Onest";
    src: url("../fonts/onest-600.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --page-bg: #f4f7f9;
    --surface: #ffffff;
    --surface-strong: #0b4666;
    --surface-dark: #062739;
    --text-main: #153244;
    --text-muted: #587080;
    --accent: #dc8a2d;
    --accent-soft: rgba(220, 138, 45, 0.14);
    --line: rgba(11, 70, 102, 0.12);
    --shadow-lg: 0 24px 60px rgba(6, 39, 57, 0.14);
    --shadow-md: 0 18px 40px rgba(6, 39, 57, 0.09);
    --radius-lg: 32px;
    --radius-md: 24px;
    --radius-sm: 16px;
    --shell: 1200px;
    --shadow-lg: 0 24px 60px rgba(6, 39, 57, 0.14);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Onest", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(220, 138, 45, 0.08), transparent 32%),
        linear-gradient(180deg, #f8fbfc 0%, #edf3f6 100%);
    color: var(--text-main);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.shell {
    width: min(calc(100% - 32px), var(--shell));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(248, 251, 252, 0.9);
    border-bottom: 1px solid rgba(11, 70, 102, 0.08);
}

.header-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand img {
    width: 96px;
    height: auto;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 3px;
}

.brand-copy strong {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

.brand-copy span:last-child {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.site-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.site-nav a,
.contact-strip a {
    position: relative;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-muted);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.contact-strip a:hover,
.contact-strip a:focus-visible {
    background: rgba(11, 70, 102, 0.08);
    color: var(--surface-strong);
}

.contact-strip {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.menu-toggle {
    display: none;
    justify-self: end;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--surface-strong);
    padding: 10px 16px;
    cursor: pointer;
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 48px 0 40px;
    background:
        linear-gradient(110deg, rgba(6, 39, 57, 0.86), rgba(11, 70, 102, 0.74)),
        url("../images/hero-surveillance.webp") center/cover no-repeat;
    color: #f9fcfd;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: auto auto -120px -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(220, 138, 45, 0.2);
    filter: blur(24px);
}

.hero-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: stretch;
}

.hero-panel,
.hero-summary {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero-panel {
    padding: 36px;
    background: rgba(5, 24, 35, 0.48);
}

.hero-panel h1 {
    margin: 0 0 18px;
    max-width: 12ch;
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    line-height: 0.95;
}

.hero-text {
    max-width: 62ch;
    margin: 0 0 24px;
    color: rgba(249, 252, 253, 0.82);
    font-size: 1.06rem;
    line-height: 1.65;
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero-points {
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.hero-points li {
    position: relative;
    padding-left: 26px;
    color: rgba(249, 252, 253, 0.86);
    line-height: 1.5;
}

.hero-points li::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(220, 138, 45, 0.12);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--accent);
    color: #fffdf9;
    box-shadow: 0 12px 28px rgba(220, 138, 45, 0.28);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #f9fcfd;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-summary {
    display: grid;
    gap: 14px;
    padding: 22px;
    background: rgba(248, 251, 252, 0.95);
    color: var(--text-main);
}

.summary-card {
    padding: 18px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid rgba(11, 70, 102, 0.08);
}

.summary-card a,
.summary-card p {
    margin: 6px 0 0;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--surface-strong);
}

.summary-card p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
}

.summary-label {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.summary-card-accent {
    background: linear-gradient(180deg, rgba(11, 70, 102, 0.08), rgba(220, 138, 45, 0.08));
}

.section-block {
    padding: 88px 0;
}

.section-muted {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(242, 247, 249, 0.96));
}

.section-heading {
    display: grid;
    gap: 12px;
    max-width: 720px;
    margin-bottom: 34px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.04;
}

.section-heading p:last-child {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.task-grid,
.project-grid,
.article-grid {
    display: grid;
    gap: 20px;
}

.task-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.project-card,
.article-card,
.story-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.info-card {
    padding: 24px;
    border-radius: var(--radius-md);
}

.info-card h3,
.project-card h3,
.article-card h3,
.story-card h3 {
    margin: 0 0 10px;
    font-size: 1.18rem;
    line-height: 1.3;
}

.info-card p,
.project-card p,
.article-card p,
.story-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.info-icon {
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 16px;
    background: var(--accent-soft);
    color: var(--surface-strong);
}

.info-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.story-card {
    padding: 28px;
    border-radius: var(--radius-md);
}

.story-card-wide {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #082f45, #0b4666);
    color: #f9fcfd;
}

.story-card-wide p,
.story-card-wide .stats-row span {
    color: rgba(249, 252, 253, 0.78);
}

.story-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 1.7;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.stats-row div {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.stats-row strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.stats-row span {
    display: block;
    line-height: 1.5;
}

.project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
    padding: 28px;
    border-radius: var(--radius-md);
}

.project-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--surface-strong);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.article-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-card {
    overflow: hidden;
    border-radius: var(--radius-md);
}

.article-card img {
    width: 100%;
    aspect-ratio: 5 / 3;
    object-fit: cover;
}

.article-content {
    display: grid;
    gap: 14px;
    padding: 24px;
}

.article-tag {
    color: var(--surface-strong);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.article-link {
    font-weight: 600;
    color: var(--surface-strong);
}

.site-footer {
    padding: 28px 0 24px;
    background: #061d2a;
    color: rgba(249, 252, 253, 0.86);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 24px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid p,
.footer-bottom p {
    margin: 0;
    line-height: 1.6;
}

.footer-grid a {
    display: block;
    margin-top: 10px;
    color: rgba(249, 252, 253, 0.86);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    color: rgba(249, 252, 253, 0.62);
    font-size: 0.95rem;
}

@media (max-width: 1080px) {
    .header-top {
        grid-template-columns: auto 1fr;
    }

    .contact-strip {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .hero-layout,
    .project-grid,
    .article-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .task-grid,
    .story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .header-top {
        grid-template-columns: auto auto;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        display: none;
        grid-column: 1 / -1;
        justify-content: stretch;
        padding-top: 6px;
    }

    .site-nav.is-open {
        display: grid;
        grid-template-columns: 1fr;
    }

    .site-nav a {
        width: 100%;
        text-align: left;
        background: var(--surface);
        border: 1px solid var(--line);
    }

    .hero-section {
        padding-top: 28px;
    }

    .hero-panel {
        padding: 28px;
    }
}

@media (max-width: 640px) {
    .section-block {
        padding: 68px 0;
    }

    .task-grid,
    .story-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }

    .hero-panel h1 {
        max-width: 10ch;
    }
}

@media (max-width: 480px) {
    .shell {
        width: min(calc(100% - 24px), var(--shell));
    }

    .brand {
        gap: 10px;
    }

    .brand img {
        width: 82px;
    }

    .brand-copy strong {
        font-size: 0.98rem;
    }

    .brand-copy span:last-child {
        font-size: 0.82rem;
    }

    .hero-panel,
    .hero-summary,
    .info-card,
    .story-card,
    .project-card,
    .article-content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero-panel {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .contact-strip {
        gap: 4px;
    }

    .contact-strip a {
        padding-left: 0;
        padding-right: 0;
    }
}
/* ========== СТРАНИЦА РЕШЕНИЯ (SOLUTIONS) ========== */

/* Сетка для карточек решений — 2 колонки */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

/* Карточка решения */
.solution-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Изображение в карточке */
.solution-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--accent-soft);
}

.solution-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.solution-card:hover .solution-image img {
    transform: scale(1.02);
}

/* Контент карточки */
.solution-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    flex: 1;
}

.solution-content h2 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.25;
    color: var(--surface-dark);
}

.solution-content p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
}

.solution-content .button {
    align-self: flex-start;
    margin-top: 8px;
}

/* Адаптив для планшетов */
@media (max-width: 900px) {
    .solutions-grid {
        gap: 20px;
    }
    
    .solution-content {
        padding: 20px;
    }
    
    .solution-content h2 {
        font-size: 1.25rem;
    }
}

/* Адаптив для мобильных — одна колонка */
@media (max-width: 640px) {
    .solutions-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .solution-content {
        padding: 18px;
    }
}

/* ========== СТРАНИЦА УСЛУГИ (SERVICES) ========== */

/* Сетка для карточек услуг — 4 колонки на десктопе */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

/* Карточка услуги */
.service-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Номер услуги */
.service-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 20px;
    line-height: 1;
}

/* Заголовок услуги */
.service-card h2 {
    margin: 0 0 16px;
    font-size: 1.3rem;
    line-height: 1.3;
    color: var(--surface-dark);
}

/* Описание услуги */
.service-card p {
    margin: 0 0 24px;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
}

/* Кнопка в карточке */
.service-card .button {
    align-self: center;
    margin-top: auto;
}

/* Адаптив для планшетов — 2 колонки */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    
    .service-card {
        padding: 24px 20px;
    }
    
    .service-number {
        font-size: 2rem;
    }
    
    .service-card h2 {
        font-size: 1.2rem;
    }
}

/* Адаптив для мобильных — 1 колонка */
@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 20px 18px;
    }
}
/* ========== СТРАНИЦА СТАТЬИ (BLOG) ========== */

/* Двухколоночная сетка: статьи + сайдбар */
.articles-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    gap: 40px;
}

/* Сетка статей — 3 колонки как на скриншоте */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

/* Карточка статьи */
.article-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Изображение в карточке */
.article-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.02);
}

/* Дата-бейдж на изображении */
.article-date-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 6px 8px;
    background: rgba(6, 39, 57, 0.85);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-sm);
    color: #fff;
    text-align: center;
    line-height: 1.2;
}

.date-day {
    font-size: 1.2rem;
    font-weight: 700;
}

.date-month {
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Контент карточки */
.article-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.article-category a {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.article-title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.35;
}

.article-title a {
    color: var(--surface-dark);
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: var(--accent);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-author img {
    border-radius: 50%;
}

.article-excerpt {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.article-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--surface-dark);
    transition: color 0.2s ease;
}

.article-read-more:hover {
    color: var(--accent);
}

/* Сайдбар */
.articles-sidebar {
    display: grid;
    gap: 32px;
    align-self: start;
}

.sidebar-widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
}

.widget-title {
    margin: 0 0 18px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--surface-dark);
}

/* Категории */
.categories-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.categories-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.categories-list li:last-child {
    border-bottom: 0;
}

.categories-list a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.categories-list a:hover,
.categories-list a.active {
    color: var(--accent);
}

.categories-list .count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Последние публикации */
.recent-posts-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 18px;
}

.recent-posts-list li {
    display: flex;
    gap: 14px;
}

.recent-post-image {
    flex-shrink: 0;
    width: 70px;
    height: 60px;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-info h5 {
    margin: 0 0 6px;
    font-size: 0.9rem;
    line-height: 1.35;
}

.recent-post-info time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span,
.pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.pagination a:hover,
.pagination-current {
    background: var(--surface-dark);
    border-color: var(--surface-dark);
    color: #fff;
}

/* Пустое состояние */
.empty-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

/* Адаптив */
@media (max-width: 1100px) {
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .articles-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-card-content {
        padding: 16px;
    }
    
    .sidebar-widget {
        padding: 18px;
    }
}
/* ========== СТРАНИЦА КАТАЛОГА ========== */

/* Двухколоночная сетка: фильтры + товары */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
}

/* Сайдбар с фильтрами */
.catalog-sidebar {
    display: grid;
    gap: 32px;
    align-self: start;
}

.filter-widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px;
}

.filter-title {
    margin: 0 0 18px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--surface-dark);
}

/* Фильтр по цене */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.price-inputs input {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-align: center;
}

.price-inputs span {
    color: var(--text-muted);
}

.price-slider {
    height: 4px;
    background: var(--line);
    border-radius: 2px;
    margin: 20px 0;
}

/* Чекбоксы */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* Категории в фильтре */
.categories-filter {
    margin: 0;
    padding: 0;
    list-style: none;
}

.categories-filter li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.categories-filter li:last-child {
    border-bottom: 0;
}

.categories-filter a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.categories-filter a:hover,
.categories-filter a.active {
    color: var(--accent);
}

.categories-filter .count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Верхняя панель инструментов */
.catalog-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.catalog-tools-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.products-count {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.catalog-tools-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.per-page-select,
.sort-select {
    display: flex;
    align-items: center;
    gap: 8px;
}

.per-page-select span,
.sort-select span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.per-page-select a {
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.per-page-select a:hover,
.per-page-select a.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.sort-select select {
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
}

/* Переключение вида (сетка/список) */
.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.grid-view {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23587080' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.view-btn.list-view {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23587080' stroke-width='2'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.view-btn.active {
    border-color: var(--accent);
    background-color: var(--accent-soft);
}

/* Сетка товаров — 4 колонки */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* Карточка товара */
.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Изображение товара */
.product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.02);
}

/* Бейдж наличия */
.stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: #4caf50;
    color: #fff;
}

.stock-badge.out-of-stock {
    background: #f44336;
    color: #fff;
}

.stock-badge.on-order {
    background: #ff9800;
    color: #fff;
}

/* Информация о товаре */
.product-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.product-title a {
    color: var(--surface-dark);
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: var(--accent);
}

.product-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.product-price {
    margin-top: 6px;
}

.product-price .price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--surface-dark);
}

.product-price .price-on-request {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
}

.product-btn {
    margin-top: 8px;
    width: 100%;
}

/* Пустое состояние */
.empty-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

/* Адаптив */
@media (max-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .catalog-sidebar {
        order: 2;
    }
    
    .catalog-products {
        order: 1;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-tools {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .catalog-tools-right {
        flex-wrap: wrap;
    }
}
/* ========== СЛАЙДЕР ЦЕНЫ ========== */
.price-filter {
    width: 100%;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.price-input {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 14px;
}

.price-inputs span {
    color: var(--text-muted);
}

.price-slider-container {
    padding: 10px 0 20px;
}

/* noUI Slider стили */
.noUi-target {
    background: var(--line);
    border-radius: 4px;
    border: none;
    box-shadow: none;
    height: 4px;
}

.noUi-connect {
    background: var(--accent);
}

.noUi-handle {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    right: -9px !important;
    top: -7px !important;
}

.noUi-handle::before,
.noUi-handle::after {
    display: none;
}

.noUi-touch-area {
    width: 100%;
    height: 100%;
}

/* Ценовой слайдер (noUiSlider) */
.price-slider {
    margin: 20px 0 10px;
}
.price-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: center;
}
.reset-filters {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
}
.price-apply {
    border: none !important;
    box-shadow: none;
}
/* Активные фильтры */
.active-filters {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.active-filters li {
    background: var(--accent-soft);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.remove-filter {
    color: var(--text-muted);
    font-weight: bold;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
}
.remove-filter:hover {
    color: var(--accent);
}
/* Переопределение кнопки OK в фильтре цены — белый фон, тёмный текст */
/* .filter-widget .price-apply.button-secondary,
.catalog-sidebar .price-apply.button-secondary {
    background: #ffffff !important;
    color: #276f87 !important;
    border: 1px solid var(--line) !important;
    transition: all 0.2s ease;
}

.filter-widget .price-apply.button-secondary:hover,
.catalog-sidebar .price-apply.button-secondary:hover {
    background: #f0f0f0 !important;
    color: #1a5a6e !important;
    border-color: var(--surface-dark) !important;
} */

/* ========== ВЫПАДАЮЩЕЕ МЕНЮ (DROPDOWN) ========== */

/* Пункт меню с выпадашкой */
.nav-item-has-dropdown {
    position: relative;
}

/* Кнопка-ссылка с индикатором */
.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-trigger .arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.dropdown-trigger[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

/* Выпадающий контейнер */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 240px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
}

/* Активное состояние выпадашки */
.dropdown-menu.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Сетка для подразделов — две колонки */
.dropdown-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 12px;
}

/* Ссылки в выпадашке */
.dropdown-menu a {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--text-main) !important;
    background: transparent !important;
    transition: background 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--accent-soft) !important;
    color: var(--surface-strong) !important;
}

/* Адаптив: на мобильных выпадашка раскрывается блочно */
@media (max-width: 860px) {
    .nav-item-has-dropdown {
        position: static;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--line);
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        grid-template-columns: 1fr;
        padding: 8px 0 8px 20px;
    }
    
    .dropdown-menu.is-visible {
        display: grid;
    }
    
    .dropdown-trigger .arrow {
        margin-left: auto;
    }
}
   .page-header {
        padding: 48px 0 24px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
    }
    
    .page-header-content {
        max-width: 800px;
    }
    
    .page-header-content .eyebrow {
        margin-bottom: 12px;
    }
    
    .page-header-content h1 {
        margin: 0 0 20px;
        font-size: clamp(1.8rem, 4vw, 2.8rem);
        line-height: 1.2;
        color: var(--surface-dark);
    }
    
/* ========== ДЕТАЛЬНАЯ СТРАНИЦА СТАТЬИ ========== */

/* Мета-блок (автор, дата, время чтения) */
.article-meta-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-text {
    font-weight: 500;
}

/* Сетка контент + сайдбар */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    gap: 40px;
}

/* Обёртка контента статьи */
.article-content-wrapper {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

/* Главное изображение */
.article-featured-image {
    margin: -40px -40px 30px -40px;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Типография статьи */
.article-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-main);
}

.article-body h2 {
    font-size: 1.6rem;
    margin: 1.5em 0 0.5em;
    color: var(--surface-dark);
}

.article-body h3 {
    font-size: 1.3rem;
    margin: 1.2em 0 0.4em;
}

.article-body p {
    margin-bottom: 1.2em;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-body th,
.article-body td {
    padding: 10px 12px;
    border: 1px solid var(--line);
}

.article-body th {
    background: var(--surface-dark);
    color: #fff;
}

/* Блок "Поделиться" */
.article-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.share-label {
    font-weight: 600;
    color: var(--surface-dark);
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.share-vk { background: #4c75a3; color: #fff; }
.share-tg { background: #26a5e4; color: #fff; }
.share-wa { background: #25d366; color: #fff; }
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* Похожие статьи */
.related-articles {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.related-articles h3 {
    margin: 0 0 24px;
    font-size: 1.3rem;
    color: var(--surface-dark);
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.related-article-card {
    display: flex;
    gap: 16px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: transform 0.2s ease;
}

.related-article-card:hover {
    transform: translateY(-2px);
}

.related-article-image {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    overflow: hidden;
}

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-article-content {
    padding: 10px 12px 10px 0;
    flex: 1;
}

.related-article-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.related-article-content h4 {
    margin: 0 0 6px;
    font-size: 0.9rem;
    line-height: 1.35;
}

.related-article-content h4 a {
    color: var(--surface-dark);
}

.related-article-content h4 a:hover {
    color: var(--accent);
}

.related-article-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Мета в сайдбаре для последних публикаций */
.recent-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.recent-post-author,
.recent-post-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Адаптив для детальной страницы */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .article-content-wrapper {
        padding: 24px;
    }
    
    .article-featured-image {
        margin: -24px -24px 24px -24px;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .article-content-wrapper {
        padding: 20px;
    }
    
    .article-featured-image {
        margin: -20px -20px 20px -20px;
    }
    
    .article-meta-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .page-header {
        padding: 32px 0 20px;
    }
}
/* Выпадашка "Ещё" в одну колонку */
.dropdown-menu-single {
    grid-template-columns: 1fr !important;
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Разделитель */
.dropdown-divider {
    height: 1px;
    background: var(--line);
    margin: 6px 0;
    grid-column: 1 / -1;
}

/* Заголовок раздела */
.dropdown-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 8px 14px 4px;
    grid-column: 1 / -1;
}


/* Дополнительные стили для выпадашки "Ещё" — в одну колонку */
.dropdown-menu-single {
    grid-template-columns: 1fr;  /* Одна колонка вместо двух */
    min-width: 180px;
}

.dropdown-menu-single a {
    white-space: nowrap;
}
/* ========== СЕТКА КАЛЬКУЛЯТОРОВ ========== */

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.calculator-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-md);
}

.calculator-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.calculator-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 16px;
    background: var(--accent-soft);
    color: var(--surface-strong);
}

.calculator-card h3 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--surface-dark);
}

.calculator-card p {
    margin: 0 0 20px;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

.calculator-card .button {
    align-self: flex-start;
    margin-top: auto;
}

/* Адаптив */
@media (max-width: 1100px) {
    .calculators-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .calculators-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-card {
        padding: 24px;
    }
}
/* ========== МОДАЛЬНОЕ ОКНО ОФЕРТЫ ========== */
.offer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 39, 57, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.offer-modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    border: 1px solid var(--line);
}

.offer-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.offer-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--surface-dark);
    line-height: 1.2;
}

.offer-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.5rem;
    transition: all 0.3s ease;
    line-height: 1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.offer-modal-close:hover {
    color: var(--surface-dark);
    background: var(--accent-soft);
}

.offer-modal-body {
    margin-bottom: 1.5rem;
}

.offer-modal-body p {
    margin-bottom: 1rem;
    color: var(--text-main);
    line-height: 1.6;
}

.offer-modal-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}

.offer-modal-body ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    line-height: 1.5;
}

.offer-modal-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.offer-link {
    color: var(--surface-strong);
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.offer-link:hover {
    color: var(--accent);
    text-decoration: none;
}

.offer-modal-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--accent-soft);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
    line-height: 1.6;
}

.offer-modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.offer-modal-footer .button {
    min-height: 48px;
}

@media (max-width: 768px) {
    .offer-modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 90vh;
        border-radius: var(--radius-md);
    }
    
    .offer-modal-footer {
        flex-direction: column;
    }
    
    .offer-modal-footer .button {
        width: 100%;
    }
}


/* ========== ВСПЛЫВАЮЩЕЕ AI-ОКНО ========== */

/* Плавающая кнопка AI-консультанта */
.ai-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9990;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(220, 138, 45, 0.4);
    transition: all 0.3s ease;
    animation: aiPulse 2s infinite;
}

.ai-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(220, 138, 45, 0.5);
}

.ai-floating-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

@keyframes aiPulse {
    0% {
        box-shadow: 0 8px 24px rgba(220, 138, 45, 0.4), 0 0 0 0 rgba(220, 138, 45, 0.4);
    }
    70% {
        box-shadow: 0 8px 24px rgba(220, 138, 45, 0.4), 0 0 0 15px rgba(220, 138, 45, 0);
    }
    100% {
        box-shadow: 0 8px 24px rgba(220, 138, 45, 0.4), 0 0 0 0 rgba(220, 138, 45, 0);
    }
}

/* Всплывающее окно чата */
.ai-chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9991;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.ai-chat-widget.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Шапка чата */
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface-dark);
    color: #fff;
}

.ai-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-chat-avatar svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.ai-chat-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.ai-chat-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-chat-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    animation: aiStatusPulse 1.5s infinite;
}

@keyframes aiStatusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ai-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: all 0.3s ease;
}

.ai-chat-close:hover {
    transform: rotate(90deg);
}

/* Сообщения чата */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fbfc;
}

.ai-message {
    padding: 10px 14px;
    border-radius: 16px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 0.9rem;
    word-wrap: break-word;
}

.ai-message.ai {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
    color: var(--text-main);
}

.ai-message.user {
    align-self: flex-end;
    background: var(--surface-dark);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ai-message.system {
    align-self: center;
    background: var(--accent-soft);
    color: var(--text-muted);
    font-style: italic;
    max-width: 90%;
    text-align: center;
}

.ai-message.error {
    align-self: center;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.ai-message.loading {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-message.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: aiLoadingSpin 0.8s linear infinite;
}

@keyframes aiLoadingSpin {
    to { transform: rotate(360deg); }
}

/* Быстрые вопросы */
.ai-quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.ai-quick-btn {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--surface-strong);
    border: 1px solid rgba(220, 138, 45, 0.3);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.ai-quick-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* Поле ввода */
.ai-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.ai-chat-input {
    flex: 1;
    min-height: 42px;
    max-height: 100px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.ai-chat-input:focus {
    border-color: var(--accent);
}

.ai-chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ai-chat-send:hover {
    transform: scale(1.1);
}

.ai-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-chat-send svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Адаптивность */
@media (max-width: 640px) {
    .ai-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .ai-chat-widget {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 60vh;
    }
}