/* ==================== Self-hosted Inter font ==================== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/static/fonts/inter-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/static/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==================== Переменные ==================== */
:root {
    /* Основная палитра — синий + белый */
    --primary: #1E3A5F;          /* глубокий синий — надежность */
    --primary-dark: #152C4A;     /* темнее для hover */
    --primary-light: #2E5984;    /* средний синий */
    --secondary: #2E5984;        /* вторичный синий */
    --accent: #2563EB;           /* насыщенный синий — CTA */
    --accent-hover: #1D4ED8;     /* темнее при наведении */

    /* Текст */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --dark: #1E293B;             /* темно-синий графит */
    --gray-900: #1E293B;
    --gray-700: #334155;
    --gray-500: #64748B;         /* серо-синий */
    --gray-300: #CBD5E1;
    --gray-200: #E2E8F0;
    --gray-100: #F1F5F9;
    --gray-50: #F8FAFC;
    --white: #FFFFFF;

    /* Фон */
    --background: #F5F3EF;       /* бежевый мраморный */
    --surface: #FDFCFA;          /* карточки - тёплый белый */
    --border: #E8E4DD;           /* границы - тёплые */

    /* Статусы */
    --danger: #DC2626;
    --success: #059669;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ==================== Сброс и базовые стили ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--background);
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* ==================== Типографика ==================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
    margin-bottom: 1rem;
}

/* ==================== Контейнер ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==================== Кнопки ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #047857;
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ==================== Хедер ==================== */
.header {
    background: var(--background);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.nav a {
    padding: 0.5rem 0.5rem;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    white-space: nowrap;
}

.nav a:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.nav a.active {
    background: var(--primary);
    color: var(--background);
}

.header-phone {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-phone svg {
    color: var(--primary);
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--dark);
}

@media (max-width: 968px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        width: 100%;
        padding: 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-phone {
        display: none;
    }
}

/* ==================== Hero секция ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-compact {
    padding: 3rem 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: var(--white);
    color: var(--primary);
}

.hero .btn-primary:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.hero .btn-secondary {
    border-color: var(--white);
    color: var(--white);
}

.hero .btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* ==================== Секции ==================== */
.section {
    padding: 5rem 0;
}

.section-gray {
    background: #EBE8E2;
    border-top: 1px solid var(--border);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--gray-700);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== Карточки услуг ==================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.features-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.features-cards .service-card {
    padding: 1.5rem;
}

@media (max-width: 1024px) {
    .features-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-cards {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
}

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

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* ==================== Преимущества ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.features-grid-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.features-grid-compact .feature-item {
    padding: 1.25rem;
}

.features-grid-compact .feature-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 0.75rem;
}

.features-grid-compact .feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
}

.feature-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.features-grid-center {
    justify-content: center;
}

/* ==================== Портфолио ==================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--gray-200);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
}

.portfolio-overlay h4 {
    color: var(--white);
    margin-bottom: 0.25rem;
}

.portfolio-overlay p {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

/* ==================== Продукт ==================== */
.product-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .product-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.product-image {
    background: var(--gray-100);
    border-radius: var(--radius-xl);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-height: 400px;
    object-fit: contain;
}

.product-info h1 {
    margin-bottom: 1rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.product-price small {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-500);
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Характеристики */
.specs-list {
    list-style: none;
    margin-bottom: 2rem;
}

.specs-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.specs-list li:last-child {
    border-bottom: none;
}

.specs-list svg {
    color: var(--secondary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.specs-list strong {
    color: var(--dark);
}

/* ==================== Формы ==================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-input::placeholder {
    color: var(--gray-500);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

select.form-input {
    cursor: pointer;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") no-repeat right 1rem center;
    appearance: none;
}

/* Форма заказа */
.order-form {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.order-form h3 {
    margin-bottom: 0.5rem;
}

/* ==================== Калькулятор ==================== */
.calculator {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.calculator h3 {
    margin-bottom: 1.5rem;
}

.calc-result {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
}

.calc-result-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.calc-result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* ==================== Баннер выбранного продукта ==================== */
.product-context-banner {
    background: var(--gray-100);
    border-left: 4px solid var(--accent);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--primary);
    font-size: 0.9rem;
}

.product-context-hint {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ==================== О компании ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.about-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ==================== Контакты ==================== */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 768px) {
    .contacts-grid {
        grid-template-columns: 1fr;
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contact-item p {
    margin: 0;
    color: var(--gray-500);
}

.contact-item a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

/* Contact icon color variants */
.contact-icon-whatsapp {
    background: #25D366;
}

.contact-icon-telegram {
    background: #0088cc;
}

/* ==================== Футер ==================== */
.footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-300);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

/* ==================== CTA секция ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.cta-section .btn {
    background: var(--white);
    color: var(--primary);
}

.cta-section .btn:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== Модальное окно ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.kp-modal-content {
    max-width: 600px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
}

/* ==================== Уведомления ==================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--dark);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1001;
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* ==================== Админка ==================== */
.admin-header {
    background: var(--dark);
    color: var(--white);
    padding: 1rem 0;
}

.admin-header h1 {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.admin-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--dark);
}

.admin-table tr:hover {
    background: var(--gray-50);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-processed {
    background: #d1fae5;
    color: #065f46;
}

/* ==================== Страница логина ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}

.login-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 2rem;
}

/* ==================== Утилиты ==================== */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 0.875rem; }
.btn-full-width { width: 100%; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ==================== Анимации ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Hidden state for scroll animations */
.animate-hidden {
    opacity: 0;
}

/* ==================== Хлебные крошки ==================== */
.breadcrumb {
    margin-bottom: 2rem;
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.breadcrumb a {
    color: var(--accent);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ==================== Каталог ==================== */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
}

.catalog-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.catalog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    color: inherit;
}

.catalog-card-image {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.catalog-card:hover .catalog-card-image img {
    transform: scale(1.05);
}

.catalog-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--danger);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.catalog-badge-kit {
    background: var(--accent);
}

.catalog-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.catalog-card-body h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.catalog-card-body p {
    color: var(--gray-500);
    font-size: 0.875rem;
    flex: 1;
}

.catalog-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.catalog-feature-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.catalog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.catalog-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    text-decoration: line-through;
    color: var(--gray-500);
    font-weight: 400;
    margin-right: 0.5rem;
}

/* ==================== Сертификаты ==================== */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.certificate-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.certificate-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.certificate-icon {
    width: 72px;
    height: 72px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.certificate-body h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.certificate-number {
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.certificate-body p:last-child {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

.certificate-stamp {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
    opacity: 0.4;
    transform: rotate(-15deg);
}

/* ==================== КП форма ==================== */
.kp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .kp-form-grid {
        grid-template-columns: 1fr;
    }
}

.kp-form-full {
    grid-column: 1 / -1;
}

/* ==================== Секция «Наши клиенты» ==================== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    align-items: center;
}

.client-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.client-logo:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.client-logo-icon {
    width: 40px;
    height: 40px;
}

.client-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 992px) {
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Price summary in form — hidden on desktop, visible on mobile */
.form-price-summary {
    display: none;
}

/* ==================== Mobile UX: разные паттерны секций ==================== */
@media (max-width: 600px) {
    /* --- Услуги: компактные горизонтальные карточки --- */
    .services-list .service-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.25rem;
    }

    .services-list .service-icon {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .services-list .service-card h3 {
        font-size: 0.9375rem;
        margin-bottom: 0;
        flex: 1;
    }

    .services-list .service-card p {
        display: none;
    }

    .services-list .service-card .btn {
        font-size: 0;
        padding: 0.75rem;
        background: none;
        border: none;
        box-shadow: none;
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .services-list .service-card .btn::after {
        content: '\2192';
        font-size: 1.25rem;
        color: var(--accent);
    }

    /* --- Преимущества: компактный 2x2 грид --- */
    .features-cards.features-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .features-compact .service-card {
        padding: 1rem;
        text-align: center;
    }

    .features-compact .service-icon {
        width: 40px;
        height: 40px;
        margin: 0 auto 0.75rem;
        border-radius: var(--radius);
    }

    .features-compact .service-icon svg {
        width: 20px;
        height: 20px;
    }

    .features-compact .service-card h3 {
        font-size: 0.875rem;
        line-height: 1.3;
        margin-bottom: 0;
    }

    .features-compact .service-card p {
        display: none;
    }

    /* --- P0: Кнопки товара — стекинг на мобиле --- */
    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* --- P0: Крестик модалки — увеличенный touch-таргет --- */
    .modal-close {
        font-size: 2rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* --- P1: Toast — не вылезает за экран --- */
    .toast {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    /* --- P2: Картинка товара — меньше padding --- */
    .product-image {
        padding: clamp(1.5rem, 5vw, 3rem);
    }

    /* --- Цена калькулятора внутри формы (1:1 как .calc-result) --- */
    .form-price-summary {
        display: block;
        margin-top: 0;
        margin-bottom: 1rem;
    }

    /* --- "Что входит в услугу": компактные строки --- */
    .features-grid {
        gap: 0;
    }

    .features-grid .feature-item {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        text-align: left;
        padding: 1rem 0;
    }

    .features-grid .feature-item + .feature-item {
        border-top: 1px solid var(--border);
    }

    .features-grid .feature-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        margin: 0;
    }

    .features-grid .feature-icon svg {
        width: 24px;
        height: 24px;
    }

    .features-grid .feature-item h3 {
        font-size: 0.9375rem;
        margin-bottom: 0.25rem;
    }

    .features-grid .feature-item p {
        font-size: 0.8125rem;
    }

    .features-grid-compact {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .features-grid-compact .feature-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-align: left;
        padding: 0.75rem;
        background: white;
        border-radius: 8px;
        border: none;
    }

    .features-grid-compact .feature-item + .feature-item {
        border-top: none;
    }

    .features-grid-compact .feature-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        margin: 0;
    }

    .features-grid-compact .feature-icon svg {
        width: 20px;
        height: 20px;
    }

    .features-grid-compact .feature-item h3 {
        font-size: 0.875rem;
        margin-bottom: 0.125rem;
    }

    .features-grid-compact .feature-item p {
        font-size: 0.75rem;
    }
}

/* --- P1: Hero-кнопки — стекинг на узких экранах --- */
@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

/* ==================== Печать каталога ==================== */
@media print {
    .header, .footer, .cta-section, .no-print, .hero {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        padding: 1rem 0;
    }

    .catalog-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .certificate-card {
        break-inside: avoid;
    }
}

/* ==================== FAQ ==================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item.faq-active {
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    line-height: 1.4;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-arrow {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--text-secondary);
}

.faq-active .faq-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}
