:root {
    --primary: #2a5235;
    --accent: #c59b27;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --text: #4a5568;
    --border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; scroll-behavior: smooth; }
body { color: var(--text); background: #ffffff; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; }

/* Кнопки */
.btn { display: inline-block; background: var(--primary); color: #fff; padding: 12px 30px; border-radius: 6px; font-size: 15px; font-weight: 600; border: 2px solid var(--primary); cursor: pointer; transition: 0.3s ease; text-align: center; }
.btn:hover { background: transparent; color: var(--primary); }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn-accent:hover { background: transparent; color: var(--accent); }

/* 1. Header с бургер-меню */
header { background: #fff; box-shadow: 0 2px 15px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; position: relative; }
.logo { display: flex; flex-direction: column; }
.logo-title { font-size: 24px; font-weight: 800; color: var(--primary); letter-spacing: 0.5px; }
.logo-sub { font-size: 12px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* Бургер-кнопка */
.burger {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}
.burger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger span:nth-child(3) { bottom: 0; }
.burger.active span:nth-child(1) { transform: rotate(45deg); top: 50%; }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg); bottom: 50%; }

nav {
    position: static;
}
nav ul {
    display: flex;
    gap: 25px;
    list-style: none;
}
nav a { font-size: 15px; font-weight: 500; color: var(--dark); transition: 0.2s; }
nav a:hover { color: var(--primary); }
.header-contacts { display: flex; align-items: center; gap: 15px; }
.phone { font-weight: 700; font-size: 16px; color: var(--dark); }
.social-btns { display: flex; gap: 6px; }
.soc-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 4px; color: #fff; font-size: 12px; font-weight: bold; }
.tg { background: #2ea6da; }
.max { background: #4a76a8; }

/* 2. Герой-слайдер */
.hero { position: relative; padding: 80px 0; color: #fff; overflow: hidden; min-height: 500px; display: flex; align-items: center; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0; transition: opacity 0.8s ease-in-out; }
.hero-bg.active { opacity: 1; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(26,51,33,0.85) 0%, rgba(26,51,33,0.6) 100%); z-index: 2; }
.hero .container { position: relative; z-index: 3; width: 100%; }
.slider-container { max-width: 850px; position: relative; }
.slide { display: none; animation: fadeIn 0.8s ease-in-out; }
.slide.active { display: block; }
.slide h1 { font-size: 40px; font-weight: 700; line-height: 1.3; margin-bottom: 20px; text-shadow: 0 2px 4px rgba(0,0,0,0.2); color: #ffffff; }
.slide p { font-size: 18px; margin-bottom: 35px; color: #f0f4f1; max-width: 650px; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 3. About Section */
.about { padding: 60px 0; background: var(--light); text-align: center; }
.section-title { font-size: 30px; font-weight: 700; color: var(--dark); margin-bottom: 35px; position: relative; }
.section-title::after { content: ''; width: 50px; height: 3px; background: var(--accent); display: block; margin: 12px auto 0; }
.about-text { max-width: 900px; margin: 0 auto; font-size: 17px; color: #555; line-height: 1.8; }
.about-blockquote { margin-top: 25px; font-size: 19px; color: var(--primary); font-weight: 600; }

/* 4. Преимущества */
.advantages { padding: 60px 0; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-top: 45px; }
.adv-card { text-align: center; padding: 25px 20px; background: #fff; border: 1px solid var(--border); border-radius: 8px; transition: 0.3s; }
.adv-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--primary); }
.adv-icon-wrap { width: 60px; height: 60px; background: #eaf1ec; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.adv-icon-svg { width: 28px; height: 28px; fill: none; stroke: var(--primary); stroke-width: 2; }
.adv-card h3 { font-size: 17px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.adv-card p { font-size: 14px; color: #666; line-height: 1.6; }

/* 5. Примеры работ */
.portfolio { padding: 60px 0; background: var(--light); position: relative; }
.badge { display: inline-block; background: #e74c3c; color: #fff; padding: 4px 12px; font-size: 12px; font-weight: 700; border-radius: 4px; margin-bottom: 15px; text-transform: uppercase; }
.portfolio-slider-wrapper { overflow-x: auto; margin-top: 40px; padding: 10px 0 20px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.portfolio-track { display: flex; gap: 24px; min-width: min-content; }
.product-card { background: #fff; width: 280px; flex-shrink: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.03); border: 1px solid var(--border); display: flex; flex-direction: column; }
.product-img { width: 100%; height: 210px; object-fit: cover; }
.product-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.product-info h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.product-info p { font-size: 13px; color: #666; margin-bottom: 15px; line-height: 1.5; }
.product-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 15px; margin-top: auto; }
.price { font-size: 13px; color: #777; }
.price span { color: var(--primary); font-weight: 700; font-size: 16px; }
.slider-btn { display: none; }

/* 6. Производство - горизонтальный скролл на всех устройствах */
.production { 
    padding: 60px 0; 
    text-align: center; 
    overflow-x: hidden;
    position: relative;
}

.prod-grid { 
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin-top: 40px;
    padding: 10px 0 20px 0;
    grid-template-columns: none;
}

.prod-grid::-webkit-scrollbar {
    height: 6px;
}

.prod-grid::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 10px;
}

.prod-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.prod-item { 
    width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
    height: 300px; 
    border-radius: 6px; 
    overflow: hidden; 
    position: relative; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
}

.prod-img-large { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.4s; 
}

.prod-item:hover .prod-img-large { 
    transform: scale(1.04); 
}

.prod-meta { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: rgba(0,0,0,0.6); 
    color: #fff; 
    padding: 10px; 
    font-size: 13px; 
    text-align: left; 
}

.divider { 
    height: 1px; 
    background: var(--border); 
    max-width: 900px; 
    margin: 60px auto 40px; 
}

/* ТРИ ГЛАВНЫХ КАТЕГОРИЙНЫХ БЛОКА */
.category-section { padding: 60px 0; border-bottom: 1px solid var(--border); }
.category-section:nth-of-type(even) { background: var(--light); }
.cat-flex { display: flex; align-items: center; gap: 50px; margin-top: 30px; }
.cat-info { flex: 1.1; display: flex; flex-direction: column; justify-content: center; }
.cat-info h3 { font-size: 26px; color: var(--dark); margin-bottom: 15px; font-weight: 700; }
.cat-info p { margin-bottom: 20px; font-size: 16px; color: #555; }
.cat-features { list-style: none; margin-bottom: 25px; }
.cat-features li { position: relative; padding-left: 25px; margin-bottom: 12px; font-size: 15px; }
.cat-features li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: bold; }

/* Слайдер категорий - стили для ПК (как было раньше) */
@media (min-width: 769px) {
    .cat-media { 
        flex: 0.9; 
        position: relative; 
        width: 100%; 
        height: 420px;
        border-radius: 8px; 
        overflow: hidden; 
        box-shadow: 0 6px 20px rgba(0,0,0,0.07); 
        background: #f0f0f0;
    }
    
    .cat-slider-container {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    .cat-slider-track { 
        display: flex; 
        width: 100%;
        height: 100%;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    }
    
    .cat-slide-img { 
        min-width: 100%;
        width: 100%;
        height: 100%;
        object-fit: cover; 
        flex-shrink: 0;
    }
    
    /* Кнопки навигации */
    .cat-nav-btn { 
        position: absolute; 
        top: 50%; 
        transform: translateY(-50%); 
        width: 40px; 
        height: 40px; 
        background: rgba(255,255,255,0.95); 
        border-radius: 50%; 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        cursor: pointer; 
        border: 1px solid var(--border); 
        z-index: 5; 
        transition: 0.2s; 
        box-shadow: 0 2px 6px rgba(0,0,0,0.1); 
    }
    .cat-nav-btn:hover { background: var(--primary); border-color: var(--primary); }
    .cat-nav-btn:hover svg { stroke: #fff; }
    .cat-nav-btn svg { width: 18px; height: 18px; stroke: var(--dark); stroke-width: 3; fill: none; }
    .cat-nav-btn.prev { left: 15px; }
    .cat-nav-btn.next { right: 15px; }
}

/* ОТДЕЛЬНЫЙ БЛОК: Галерея кухонных фасадов */
.facades-section { padding: 40px 0 60px; background: #ffffff; border-bottom: 1px solid var(--border); position: relative; }
.facades-inner { background: var(--light); padding: 30px; border-radius: 12px; border: 1px solid var(--border); position: relative; }
.facades-header { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.facades-title { font-size: 18px; font-weight: 700; color: var(--primary); letter-spacing: 0.3px; display: flex; align-items: center; gap: 10px; }
.facades-title::before { content: ''; width: 4px; height: 18px; background: var(--accent); display: inline-block; border-radius: 2px; }
.facades-nav { display: flex; gap: 8px; }
.facade-btn { width: 36px; height: 36px; background: #fff; border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.2s; user-select: none; }
.facade-btn:hover { background: var(--primary); border-color: var(--primary); }
.facade-btn:hover svg { stroke: #fff; }
.facade-btn svg { width: 16px; height: 16px; stroke: var(--dark); stroke-width: 3; fill: none; }
.facades-slider-container { overflow-x: auto; width: 100%; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.facades-scroll { display: flex; gap: 20px; min-width: min-content; }
.facade-card { width: 160px; text-align: center; flex-shrink: 0; }
.facade-img { width: 160px; height: 210px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); transition: 0.3s; box-shadow: 0 3px 8px rgba(0,0,0,0.03); background: #fff; }
.facade-name { font-size: 13px; margin-top: 10px; color: var(--dark); font-weight: 600; line-height: 1.3; }

/* 7. Форма заказа */
.order-form { padding: 60px 0; background: var(--primary); color: #fff; text-align: center; }
.order-form .section-title { color: #fff; }
.form-wrapper { max-width: 700px; margin: 35px auto 0; background: #fff; padding: 25px; border-radius: 8px; color: var(--dark); }

/* 8 & 9. Контакты и Салоны */
.contacts-section { padding: 60px 0; background: var(--light); }
.contacts-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; margin-top: 40px; }
.info-list p { margin-bottom: 15px; font-size: 15px; }
.info-list strong { color: var(--dark); font-size: 14px; text-transform: uppercase; display: block; margin-bottom: 2px; }
.map-container { border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid var(--border); min-height: 450px; }
.salons-title { margin: 35px 0 20px; font-size: 20px; font-weight: 700; color: var(--dark); }
.salons-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.salon-card { background: #fff; padding: 20px; border-radius: 6px; border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(0,0,0,0.02); }
.salon-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--primary); }
.salon-card p { font-size: 13px; color: #555; }

/* 10. Подвал и SEO */
footer { background: #1a3321; color: #d1d5db; padding: 50px 0 25px; font-size: 14px; }
.seo-text { font-size: 13px; line-height: 1.7; text-align: justify; margin-bottom: 35px; padding-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.1); color: #a0aec0; }
.footer-bottom { display: flex; justify-content: space-between; color: #718096; font-size: 12px; }

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ (до 768px) ========== */
@media (max-width: 768px) {
    /* Уменьшаем отступы блоков */
    .about, .advantages, .portfolio, .production, .category-section, .order-form, .contacts-section {
        padding: 40px 0;
    }
    
    /* Бургер-меню */
    .burger {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: 2px 0 20px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        z-index: 1000;
        padding-top: 80px;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    nav ul li {
        border-bottom: 1px solid var(--border);
    }
    
    nav ul li a {
        display: block;
        padding: 15px 20px;
        font-size: 16px;
    }
    
    /* Оверлей при открытом меню */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* Шапка на мобильных */
    .header-inner {
        flex-wrap: wrap;
    }
    
    .logo {
        flex: 1;
    }
    
    .header-contacts {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        margin-bottom: 5px;
    }
    
    /* Герой-слайдер */
    .hero {
        padding: 60px 0;
        min-height: 400px;
    }
    
    .slide h1 {
        font-size: 24px;
    }
    
    .slide p {
        font-size: 14px;
    }
    
    /* Категории - вертикальное расположение */
    .cat-flex {
        flex-direction: column;
        gap: 20px;
    }
    
    .cat-info {
        width: 100%;
        order: 2;
    }
    
    /* Слайдер категорий - стили для мобильных */
    .cat-media { 
        width: 100%; 
        order: 1;
        position: relative; 
        border-radius: 8px; 
        overflow: hidden; 
        box-shadow: 0 6px 20px rgba(0,0,0,0.07); 
        background: #f0f0f0;
        margin-bottom: 10px;
        height: auto;
    }
    
    .cat-slider-container {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .cat-slider-track {
        display: flex;
        width: max-content;
        gap: 10px;
        transition: none;
        transform: none !important;
        height: auto;
    }
    
    .cat-slide-img {
        width: calc(100vw - 80px);
        min-width: calc(100vw - 80px);
        height: auto;
        min-height: 220px;
        max-height: 280px;
        object-fit: cover;
        border-radius: 8px;
        scroll-snap-align: start;
    }
    
    /* Скрываем кнопки на мобильных */
    .cat-nav-btn {
        display: none;
    }
    
    /* Портфолио слайдер */
    .portfolio-slider-wrapper {
        overflow-x: auto;
    }
    
    /* Фасады */
    .facades-slider-container {
        overflow-x: auto;
    }
    
    .facades-nav {
        display: none;
    }
    
    /* Производство */
    .prod-grid {
        padding: 10px 0 20px 0;
    }
    
    .prod-item {
        width: 260px;
        height: 280px;
    }
    
    /* Контакты */
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .map-container {
        min-height: 300px;
    }
    
    /* Футер */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

/* Маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    .about, .advantages, .portfolio, .production, .category-section, .order-form, .contacts-section {
        padding: 30px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .slide h1 {
        font-size: 20px;
    }
    
    .product-card {
        width: 260px;
    }
    
    .prod-item {
        width: 240px;
        height: 260px;
    }
    
    .facade-card {
        width: 140px;
    }
    
    .facade-img {
        width: 140px;
        height: 180px;
    }
    
    .cat-slide-img {
        width: calc(100vw - 60px);
        min-width: calc(100vw - 60px);
        min-height: 200px;
        max-height: 250px;
    }
}

/* Десктопная версия - дополнительные стили */
@media (min-width: 769px) {
    .prod-grid {
        padding: 10px 0 20px 0;
    }
    
    .prod-grid::-webkit-scrollbar {
        height: 8px;
    }
}

/* Адаптация формы */
.form-wrapper {
    max-width: 700px;
    margin: 35px auto 0;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    color: var(--dark);
}

.form-wrapper iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 6px;
    display: block;
}

/* На мобильных уменьшаем высоту формы */
@media (max-width: 768px) {
    .form-wrapper {
        padding: 15px;
    }
    
    .form-wrapper iframe {
        height: 550px;
    }
}

@media (max-width: 480px) {
    .form-wrapper iframe {
        height: 500px;
    }
}