/* =========================================
   1. ПЕРЕМЕННЫЕ И БАЗА
   ========================================= */
:root {
    --primary-blue: #0077FF;
    --dark-blue: #004BB5;
    --bg-dark: #0A0E17;
    --bg-card: #121824;
    --text-main: #FFFFFF;
    --text-muted: #8B95A5;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.btn {
    background: var(--primary-blue);
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn:hover {
    background: var(--dark-blue);
    box-shadow: 0 0 20px rgba(0, 119, 255, 0.4);
    transform: translateY(-2px);
}

/* =========================================
   2. ШАПКА
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.4s ease, border-color 0.4s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo-link { display: flex; align-items: center; text-decoration: none; transition: opacity 0.3s; }
.logo-link:hover { opacity: 0.8; }

.header-logo {
    height: 180px;
    width: auto;
    max-width: none;
    object-fit: contain;
    margin: -55px 0;
    transform: scale(1.15);
    transition: transform 0.3s ease;
}

.logo-link:hover .header-logo { transform: scale(1.2); }

.nav-links { display: flex; gap: 25px; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 500; font-size: 15px; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary-blue); }

.header-right { display: flex; align-items: center; gap: 18px; }

/* =========================================
   3. HERO
   ========================================= */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 50%; left: 0;
    width: 100%; height: 100%;
    transform: translateY(-50%);
    z-index: -1;
    background: radial-gradient(circle at 70% 50%, rgba(0, 119, 255, 0.15) 0%, transparent 50%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 40%; left: -10%;
    width: 120%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    transform: rotate(-5deg);
    animation: sweep 6s infinite linear;
}

@keyframes sweep {
    0% { transform: translateX(-100%) rotate(-5deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) rotate(-5deg); opacity: 0; }
}

.hero-content { max-width: 700px; }
.hero h1 { font-size: 56px; line-height: 1.1; font-weight: 900; margin-bottom: 20px; }
.hero h1 span { color: var(--primary-blue); }
.hero p { font-size: 18px; color: var(--text-muted); margin-bottom: 40px; max-width: 500px; }

/* =========================================
   4. СЕКЦИИ
   ========================================= */
.section { padding: 100px 0; }
.section-title { font-size: 36px; font-weight: 800; margin-bottom: 50px; text-align: center; }
.bg-alt {
    background-color: var(--bg-card);
    border-top: 1px solid rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.page-header {
    padding: 140px 0 40px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* =========================================
   5. НАПРАВЛЕНИЯ
   ========================================= */
.directions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.direction-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    transition: 0.3s;
}

.direction-card:hover { border-color: var(--primary-blue); background: linear-gradient(135deg, rgba(0, 119, 255, 0.1) 0%, transparent 100%); }
.direction-flag { margin-bottom: 20px; display: flex; justify-content: center; }
.flag-img { width: 64px; height: auto; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.4); }
.direction-card h3 { font-size: 24px; margin-bottom: 15px; }
.direction-card p { color: var(--text-muted); font-size: 15px; }

/* =========================================
   6. КАРТОЧКИ АВТО (главная)
   ========================================= */
.cars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.car-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.bg-alt .car-card { background: var(--bg-dark); }
.car-card:hover { transform: translateY(-5px); border-color: var(--primary-blue); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

.car-img { width: 100%; height: 220px; object-fit: cover; background-color: #1A2235; border-bottom: 2px solid var(--primary-blue); }
.car-info { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.car-title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.car-specs { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.car-specs span { background: rgba(255,255,255,0.05); padding: 4px 10px; border-radius: 4px; }

.car-bottom {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    width: 100%;
}

.car-price { font-size: 22px; font-weight: 800; color: var(--primary-blue); }
.car-btn { width: 100%; text-align: center; font-size: 15px; padding: 10px 16px; }
.view-all-wrapper { text-align: center; margin-top: 50px; }

/* =========================================
   7. ОТЗЫВЫ (карусель на главной)
   ========================================= */
.carousel-container { position: relative; max-width: 100%; margin: 0 auto; }

.carousel-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 20px;
    scroll-behavior: smooth;
}

.carousel-track::-webkit-scrollbar { display: none; }

.review-card {
    background: var(--bg-card);
    padding: 35px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    flex: 0 0 calc(33.333% - 20px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) { .review-card { flex: 0 0 calc(50% - 15px); } }
@media (max-width: 768px) { .review-card { flex: 0 0 100%; } }

.review-card::before {
    content: "“";
    position: absolute;
    top: 10px; right: 20px;
    font-size: 100px;
    color: rgba(0, 119, 255, 0.1);
    font-family: serif;
    line-height: 1;
}

.review-text {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    text-align: left;
    transition: color 0.3s;
}

.read-more-btn:hover { color: #fff; }

.review-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.review-name { font-weight: 600; font-size: 16px; }
.review-car { font-size: 13px; color: var(--primary-blue); }

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 119, 255, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s, opacity 0.3s;
}

.carousel-btn:hover { background: var(--primary-blue); }
.carousel-btn.prev { left: -22px; }
.carousel-btn.next { right: -22px; }

@media (max-width: 1260px) {
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
}

/* =========================================
   8. КАК ЭТО РАБОТАЕТ
   ========================================= */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }

.step-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    transition: transform 0.3s;
}

.step-card:hover { transform: translateY(-5px); border-color: var(--primary-blue); }

.step-num {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(0, 119, 255, 0.85) 0%, rgba(0, 119, 255, 0.15) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: absolute;
    top: 10px; right: 20px;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.step-card h3 { font-size: 20px; margin-bottom: 15px; position: relative; z-index: 1; }
.step-card p { color: var(--text-muted); font-size: 15px; }

/* =========================================
   9. КОНТАКТЫ (современные)
   ========================================= */
.contacts-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: stretch; }

.contact-block {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(18,24,36,0.85) 100%);
    padding: 35px 30px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.contact-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.contact-block:hover { border-color: rgba(0,119,255,0.3); transform: translateY(-3px); box-shadow: 0 15px 40px rgba(0,0,0,0.3); }
.contact-block:hover::before { opacity: 1; }

.contact-block-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--text-main);
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    color: inherit;
}

.contact-card:hover {
    background: rgba(0, 119, 255, 0.06);
    border-color: rgba(0, 119, 255, 0.25);
    transform: translateX(3px);
}

.contact-card .contact-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(0,119,255,0.15), rgba(0,119,255,0.05));
    border: 1px solid rgba(0,119,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.contact-card:hover .contact-icon { transform: scale(1.08); }

.contact-card .contact-text h4 {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.contact-card .contact-text p {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    margin: 0;
}

.address-hint {
    display: inline-block;
    font-size: 12px;
    color: var(--primary-blue);
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.contact-card:hover .address-hint { opacity: 1; }

.messengers-block { margin-top: 25px; padding-top: 22px; border-top: 1px dashed rgba(255,255,255,0.1); }
.messengers-block h4 { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.messengers-list { display: flex; gap: 10px; flex-wrap: wrap; }

.messenger-btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 6px;
}

.messenger-btn.telegram { background: #229ED9; color: #fff; }
.messenger-btn.telegram:hover { background: #1a7aa8; box-shadow: 0 0 15px rgba(34,158,217,0.4); }
.messenger-btn.max { background: #7B1FA2; color: #fff; }
.messenger-btn.max:hover { background: #5e177b; box-shadow: 0 0 15px rgba(123,31,162,0.4); }

.working-hours { margin-top: 20px; padding: 20px; background: rgba(0,0,0,0.15); border-radius: 12px; border: 1px solid rgba(255,255,255,0.04); }

.working-hours-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.working-hours-header .contact-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(0,119,255,0.15), rgba(0,119,255,0.05));
    border: 1px solid rgba(0,119,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.working-hours-header h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-main); font-weight: 700; margin: 0; }

.hours-list { list-style: none; padding: 0; margin: 0 0 15px; }
.hours-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.hours-list li:last-child { border-bottom: none; }

.hours-day { color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; }
.hours-time { color: var(--text-main); font-weight: 700; font-size: 15px; }
.hours-time.weekend { color: #FF6B6B; font-weight: 600; }
.hours-note { font-size: 13px !important; color: var(--text-muted); opacity: 0.75; padding: 6px 0 !important; }

.online-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: rgba(0,119,255,0.08);
    border-radius: 10px;
    border-left: 3px solid var(--primary-blue);
    margin-top: 5px;
}

.online-note span { font-size: 18px; flex-shrink: 0; line-height: 1.4; }
.online-note p { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin: 0; }
.online-note strong { color: var(--text-main); }

/* =========================================
   10. СОВРЕМЕННАЯ ФОРМА
   ========================================= */
.modern-form { display: flex; flex-direction: column; gap: 18px; max-width: 520px; margin: 30px auto 0; }
.form-field { display: flex; flex-direction: column; gap: 8px; text-align: left; }

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding-left: 4px;
}

.modern-form input[type="text"],
.modern-form input[type="tel"],
.modern-form textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text-main);
    transition: all 0.25s ease;
    font-family: var(--font-family);
}

.modern-form input::placeholder,
.modern-form textarea::placeholder { color: rgba(139,149,165,0.55); }
.modern-form input:hover,
.modern-form textarea:hover { border-color: rgba(255,255,255,0.15); }
.modern-form input:focus,
.modern-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(0,119,255,0.05);
    box-shadow: 0 0 0 4px rgba(0,119,255,0.12);
}

.form-submit-btn {
    margin-top: 10px;
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    box-shadow: 0 6px 20px rgba(0,119,255,0.3);
    letter-spacing: 0.3px;
}

.form-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,119,255,0.5); }
.form-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.consent-checkbox { margin: 5px 0 0; text-align: left; }

.consent-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.consent-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--primary-blue);
    cursor: pointer;
    padding: 0;
}

.consent-checkbox a { color: var(--primary-blue); text-decoration: underline; }

/* =========================================
   11. МОДАЛЬНЫЕ ОКНА
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active { display: flex; opacity: 1; }

.modal-content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--primary-blue);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 0 40px rgba(0,119,255,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content { transform: translateY(0); }

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-btn:hover { color: var(--primary-blue); }
.modal-content h2 { margin-bottom: 10px; text-align: center; }
#modal-car-name { text-align: center; color: var(--primary-blue); font-weight: 600; margin-bottom: 25px; font-size: 18px; }
.review-modal-content { max-width: 700px; }

.full-review-text {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 10px;
}

.contact-modal-content { max-width: 550px; }
.contact-modal-info { display: flex; justify-content: space-around; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.contact-modal-item { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.contact-modal-item a { color: var(--text-main); text-decoration: none; transition: color 0.3s; }
.contact-modal-item a:hover { color: var(--primary-blue); }
.contact-modal-icon { font-size: 20px; }

.contact-modal-messengers {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.contact-modal-messengers .messenger-btn { flex: 1; text-align: center; }

/* =========================================
   12. ПОДВАЛ
   ========================================= */
footer.site-footer {
    background-color: var(--bg-card);
    padding: 70px 0 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: left;
    transition: background-color 0.4s ease;
}

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; }
.footer-col { display: flex; flex-direction: column; }

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-brand .footer-logo {
    height: 280px;
    width: auto;
    max-width: none;
    object-fit: contain;
    margin: -90px 0 -60px 0;
    transform: scale(1.15);
    align-self: flex-start;
}

.footer-desc { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 25px; max-width: 320px; }
.copyright { color: #555; font-size: 13px; margin-top: auto; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.footer-links a:hover { color: var(--primary-blue); transform: translateX(5px); }

.footer-requisites {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 40px;
    padding-top: 25px;
}

.footer-requisites p { color: var(--text-muted); font-size: 13px; margin-bottom: 5px; text-align: center; }
.footer-requisites a { color: var(--text-muted); text-decoration: underline; }
.footer-requisites a:hover { color: var(--primary-blue); }
.footer-legal-links { margin-top: 10px; font-size: 12px; opacity: 0.8; }

/* =========================================
   13. ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ
   ========================================= */
.theme-toggle {
    position: relative;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    overflow: hidden;
    padding: 0;
}

.theme-toggle:hover {
    border-color: var(--primary-blue);
    background: rgba(0,119,255,0.1);
    box-shadow: 0 0 20px rgba(0,119,255,0.3);
}

.theme-toggle .theme-icon {
    position: absolute;
    font-size: 22px;
    transition: all 0.5s cubic-bezier(0.68,-0.55,0.27,1.55);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-icon-dark { opacity: 1; transform: rotate(0) scale(1); }
.theme-icon-light { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* =========================================
   14. ПЛАВАЮЩИЕ КНОПКИ
   ========================================= */
.floating-buttons {
    position: fixed;
    bottom: 30px; right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1500;
}

.floating-btn {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,119,255,0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    padding: 0;
}

.floating-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
.floating-btn:hover { background: var(--dark-blue); transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 20px rgba(0,119,255,0.6); }

.contact-btn {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    background: #25D366;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
}

.contact-btn:hover { background: #1da851; box-shadow: 0 6px 20px rgba(37,211,102,0.6); }

/* =========================================
   15. УВЕДОМЛЕНИЯ (TOAST)
   ========================================= */
.form-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 15px 30px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    max-width: 90vw;
    text-align: center;
    line-height: 1.5;
}

.form-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.form-toast.success { background: #2E7D32; border: 1px solid #4CAF50; }
.form-toast.error { background: #C62828; border: 1px solid #F44336; }

/* =========================================
   16. COOKIE-БАННЕР
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 2500;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.show { transform: translateY(0); }

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-content p { color: var(--text-muted); font-size: 14px; margin: 0; flex: 1; min-width: 250px; }
.cookie-banner-content a { color: var(--primary-blue); text-decoration: underline; }
.cookie-banner-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-accept { background: var(--primary-blue); color: #fff; padding: 10px 24px; }

.cookie-decline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-muted);
    padding: 10px 24px;
}

.cookie-decline:hover { border-color: var(--text-muted); color: var(--text-main); }

/* =========================================
   17. КАТАЛОГ (обновлённые карточки)
   ========================================= */
.filter-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.search-box { flex-grow: 1; max-width: 400px; }
.search-box input { width: 100%; padding: 12px 20px; border-radius: 30px; background: var(--bg-card); border: 1px solid rgba(255,255,255,0.1); }
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; }

.filter-btn {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.filter-btn:hover { border-color: var(--primary-blue); }
.filter-btn.active { background: var(--primary-blue); border-color: var(--primary-blue); color: #fff; box-shadow: 0 0 15px rgba(0,119,255,0.3); }

.catalog-list { display: flex; flex-direction: column; gap: 14px; width: 100%; }

.catalog-item {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.catalog-item:hover { border-color: rgba(0,119,255,0.4); box-shadow: 0 6px 25px rgba(0,0,0,0.15); }

.catalog-item-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }

.catalog-item-main {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.catalog-thumb { width: 92px; height: 62px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #1A2235; }
.catalog-item-info { flex: 1; min-width: 0; }

.catalog-item-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.car-year {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    background: none;
    padding: 0;
    margin-left: 4px;
}

.catalog-item-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
    transition: opacity 0.25s ease, max-height 0.3s ease, margin 0.3s;
    max-height: 40px;
    overflow: hidden;
}

.catalog-item-chips span { background: rgba(255,255,255,0.05); padding: 3px 10px; border-radius: 4px; font-size: 13px; color: var(--text-muted); }

/* Стиль для чипса с датой */
.catalog-item-chips span.date-chip {
    background: rgba(59, 130, 246, 0.1);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-weight: 500;
}

.catalog-item.active .catalog-item-chips { opacity: 0; max-height: 0; margin: 0; }

.catalog-item-price { text-align: right; flex-shrink: 0; margin-right: 4px; line-height: 1.15; }
.catalog-item-price .price-value { font-size: 18px; font-weight: 800; color: var(--primary-blue); white-space: nowrap; }
.catalog-item-price .price-note { font-size: 11px; color: var(--text-muted); margin-top: 4px; white-space: nowrap; }

.catalog-item-side { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.catalog-expand-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0,119,255,0.1);
    border: 1px solid rgba(0,119,255,0.3);
    color: var(--primary-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.catalog-expand-btn:hover { background: rgba(0,119,255,0.22); border-color: var(--primary-blue); transform: scale(1.05); }
.catalog-expand-btn .arrow { font-size: 13px; display: inline-block; line-height: 1; transition: transform 0.3s ease; }
.catalog-item.active .catalog-expand-btn { background: var(--primary-blue); border-color: var(--primary-blue); color: #fff; }
.catalog-item.active .catalog-expand-btn .arrow { transform: rotate(180deg); }

.catalog-item-details {
    max-height: 0;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    padding: 0 18px;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.catalog-item.active .catalog-item-details { max-height: 500px; padding: 20px 18px; border-top: 1px solid rgba(255,255,255,0.06); }

.details-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.spec-item { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; }
.spec-item span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.spec-item strong { font-size: 15px; color: var(--text-main); font-weight: 700; }
.details-actions { display: flex; justify-content: flex-end; }

/* Статусы */
.status-tag { display: inline-flex; align-items: center; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-tag.delivered { background: rgba(76,175,80,0.15); color: #4CAF50; border: 1px solid rgba(76,175,80,0.35); }
.status-tag.onway { background: rgba(255,152,0,0.15); color: #FF9800; border: 1px solid rgba(255,152,0,0.35); }

/* =========================================
   18. ПАГИНАЦИЯ
   ========================================= */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 45px; flex-wrap: wrap; }

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    cursor: pointer;
    transition: 0.25s;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled):not(.active) { border-color: var(--primary-blue); color: var(--primary-blue); }
.page-btn.active { background: var(--primary-blue); border-color: var(--primary-blue); color: #fff; box-shadow: 0 0 15px rgba(0,119,255,0.35); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-arrow { font-size: 14px; }

/* =========================================
   19. СТРАНИЦА АВТОМОБИЛЯ
   ========================================= */
.car-detail-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; margin-bottom: 50px; }
@media (max-width: 992px) { .car-detail-layout { grid-template-columns: 1fr; } }

.main-image-container { width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 15px; }
.main-image { width: 100%; height: 400px; object-fit: cover; display: block; }
.thumbnail-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; }
.thumbnail-list::-webkit-scrollbar { height: 6px; }
.thumbnail-list::-webkit-scrollbar-thumb { background: var(--primary-blue); border-radius: 3px; }
.thumb { width: 100px; height: 70px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: 0.6; transition: 0.3s; border: 2px solid transparent; }
.thumb:hover, .thumb.active { opacity: 1; border-color: var(--primary-blue); }

.car-info-panel { background: var(--bg-card); padding: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
.car-badge { display: inline-block; background: rgba(0,119,255,0.1); color: var(--primary-blue); padding: 5px 15px; border-radius: 4px; font-size: 14px; font-weight: 600; margin-bottom: 15px; }
.detail-price { font-size: 32px; font-weight: 900; color: var(--primary-blue); margin: 20px 0; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 15px; }
.specs-table tr:last-child td { border-bottom: none; }
.specs-table td:first-child { color: var(--text-muted); width: 50%; }
.specs-table td:last-child { font-weight: 600; text-align: right; }

/* =========================================
   20. СТРАНИЦА ОТЗЫВОВ
   ========================================= */
.tabs-container { display: flex; justify-content: center; gap: 20px; margin-bottom: 40px; }

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { color: var(--primary-blue); border-bottom-color: var(--primary-blue); }
.tab-content { display: none; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.reviews-grid-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; }
@media (max-width: 768px) { .reviews-grid-page { grid-template-columns: 1fr; } }

.review-page-card { background: var(--bg-card); padding: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; }
.review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.review-user { display: flex; align-items: center; gap: 15px; }
.review-date { font-size: 13px; color: var(--text-muted); }
.review-rating { color: #FFB400; font-size: 18px; letter-spacing: 2px; }

/* Ограничение высоты текста в карточках отзывов */
.review-page-text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 6; /* Максимум 6 строк */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Кнопка "Читать полностью" в карточках отзывов */
.review-page-card .read-more-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 0;
    text-align: left;
    transition: color 0.3s;
}

.review-page-card .read-more-btn:hover { color: #fff; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.video-card { background: var(--bg-card); border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); cursor: pointer; transition: transform 0.3s, border-color 0.3s; }
.video-card:hover { transform: translateY(-5px); border-color: var(--primary-blue); }
.video-preview { position: relative; width: 100%; height: 200px; }
.video-preview img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: opacity 0.3s; }
.video-card:hover .video-preview img { opacity: 1; }

.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 60px; height: 60px;
    background: rgba(0,119,255,0.8);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    padding-left: 5px;
    transition: background 0.3s, transform 0.3s;
}

.video-card:hover .play-icon { background: var(--primary-blue); transform: translate(-50%,-50%) scale(1.1); }
.video-info { padding: 20px; }
.video-info h3 { font-size: 18px; margin-bottom: 5px; }
.video-info p { font-size: 14px; color: var(--text-muted); }

/* =========================================
   21. ЮРИДИЧЕСКИЕ СТРАНИЦЫ
   ========================================= */
.legal-page { padding: 140px 0 80px; }
.legal-content { max-width: 900px; margin: 0 auto; background: var(--bg-card); padding: 50px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
.legal-content h1 { font-size: 28px; margin-bottom: 30px; text-align: center; }
.legal-content h2 { font-size: 20px; margin: 30px 0 15px; color: var(--primary-blue); }
.legal-content p, .legal-content li { color: var(--text-muted); font-size: 15px; line-height: 1.8; margin-bottom: 10px; }
.legal-content ul { padding-left: 25px; margin-bottom: 15px; }
.legal-meta { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }

/* =========================================
   22. СВЕТЛАЯ ТЕМА
   ========================================= */
[data-theme="light"] {
    --bg-dark: #F0F4F9;
    --bg-card: #FFFFFF;
    --text-main: #0A0E17;
    --text-muted: #5A6478;
}

[data-theme="light"] body { background-color: var(--bg-dark); }
[data-theme="light"] header { background: rgba(255,255,255,0.92); border-bottom: 1px solid rgba(0,0,0,0.08); }
[data-theme="light"] .nav-links a { color: var(--text-main); }
[data-theme="light"] .hero-bg { background: radial-gradient(circle at 70% 50%, rgba(0,119,255,0.1) 0%, transparent 50%); }
[data-theme="light"] .bg-alt { background-color: #E6ECF3; border-top-color: rgba(0,0,0,0.04); border-bottom-color: rgba(0,0,0,0.04); }
[data-theme="light"] .direction-card { background: linear-gradient(135deg, rgba(0,119,255,0.04), transparent); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .car-card { box-shadow: 0 4px 20px rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .bg-alt .car-card { background: var(--bg-card); }
[data-theme="light"] .car-card:hover { box-shadow: 0 12px 35px rgba(0,119,255,0.15); border-color: var(--primary-blue); }
[data-theme="light"] .car-specs span { background: rgba(0,0,0,0.05); }
[data-theme="light"] .car-bottom { border-top-color: rgba(0,0,0,0.07); }
[data-theme="light"] .review-card { background: var(--bg-card); box-shadow: 0 4px 20px rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .review-author { border-top-color: rgba(0,0,0,0.07); }
[data-theme="light"] .step-card { background: var(--bg-card); box-shadow: 0 4px 20px rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .step-card:hover { box-shadow: 0 12px 30px rgba(0,119,255,0.12); border-color: var(--primary-blue); }
[data-theme="light"] .contact-block { background: #fff; border-color: rgba(0,0,0,0.06); box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
[data-theme="light"] .contact-block-title { border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .contact-card { background: rgba(0,0,0,0.015); }
[data-theme="light"] .contact-card:hover { background: rgba(0,119,255,0.06); }
[data-theme="light"] .messengers-block { border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .working-hours { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.05); }
[data-theme="light"] .working-hours-header { border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .hours-list li { border-bottom-color: rgba(0,0,0,0.05); }
[data-theme="light"] .hours-time.weekend { color: #D32F2F; }
[data-theme="light"] .online-note { background: rgba(0,119,255,0.06); }
[data-theme="light"] .cta-section { background: linear-gradient(135deg, #E6ECF3 0%, #D6E0ED 100%); }
[data-theme="light"] .modern-form input,
[data-theme="light"] .modern-form textarea { background: #fff; border-color: rgba(0,0,0,0.1); color: var(--text-main); }
[data-theme="light"] .modern-form input:hover,
[data-theme="light"] .modern-form textarea:hover { border-color: rgba(0,0,0,0.2); }
[data-theme="light"] .modal-content { background: var(--bg-card); color: var(--text-main); }
[data-theme="light"] footer.site-footer { background: var(--bg-card); border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .copyright { color: #9AA5B5; }
[data-theme="light"] .footer-requisites { border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .btn { color: #fff; }
[data-theme="light"] .theme-icon-dark { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="light"] .theme-icon-light { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .theme-toggle:hover { border-color: #FFB400; background: rgba(255,180,0,0.1); box-shadow: 0 0 20px rgba(255,180,0,0.3); }
[data-theme="light"] .cookie-banner { background: #fff; border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .cookie-decline { background: transparent !important; color: var(--text-muted) !important; border: 1px solid rgba(0,0,0,0.15) !important; }
[data-theme="light"] .cookie-decline:hover { color: var(--text-main) !important; border-color: var(--primary-blue) !important; }
[data-theme="light"] .contact-modal-messengers { border-bottom-color: rgba(0,0,0,0.1); }
[data-theme="light"] .catalog-item { border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .catalog-item:hover { box-shadow: 0 6px 25px rgba(0,119,255,0.1); }
[data-theme="light"] .catalog-item-details { background: rgba(0,0,0,0.02); }
[data-theme="light"] .catalog-item.active .catalog-item-details { border-top-color: rgba(0,0,0,0.07); }
[data-theme="light"] .catalog-item-chips span { background: rgba(0,0,0,0.05); }
[data-theme="light"] .spec-item { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.05); }
[data-theme="light"] .status-tag.delivered { background: rgba(76,175,80,0.1); color: #2E7D32; }
[data-theme="light"] .status-tag.onway { background: rgba(255,152,0,0.12); color: #E65100; }
[data-theme="light"] .search-box input { background: var(--bg-card); border-color: rgba(0,0,0,0.1); color: var(--text-main); }
[data-theme="light"] .filter-btn { background: var(--bg-card); border-color: rgba(0,0,0,0.1); color: var(--text-main); }
[data-theme="light"] .page-btn { background: var(--bg-card); border-color: rgba(0,0,0,0.1); color: var(--text-main); }
[data-theme="light"] .page-btn.active { background: var(--primary-blue); border-color: var(--primary-blue); color: #fff; box-shadow: 0 0 15px rgba(0,119,255,0.35); }
[data-theme="light"] .car-info-panel { background: var(--bg-card); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .specs-table td { border-bottom-color: rgba(0,0,0,0.07); }
[data-theme="light"] .detail-price { border-bottom-color: rgba(0,0,0,0.07); }
[data-theme="light"] .review-page-card, [data-theme="light"] .video-card { background: var(--bg-card); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .legal-content { background: #fff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .legal-meta { border-bottom-color: rgba(0,0,0,0.08); }

/* =========================================
   23. ЛОГОТИП: ИНВЕРСИЯ В ТЁМНОЙ ТЕМЕ
   ========================================= */
html:not([data-theme="light"]) .header-logo,
html:not([data-theme="light"]) .footer-logo {
    filter: invert(1) hue-rotate(180deg) brightness(1.15) saturate(1.3);
}

/* =========================================
   24. МЕДИА-ЗАПРОСЫ
   ========================================= */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .header-inner { justify-content: center; position: relative; }
    .header-right { position: absolute; right: 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; margin-bottom: 20px; }
    .contacts-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .catalog-item-row { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
    .catalog-item-main { flex-wrap: wrap; gap: 12px; }
    .catalog-thumb { width: 70px; height: 50px; }
    .catalog-item-info { flex: 1 1 100%; order: 2; }
    .catalog-item-price { text-align: left; margin: 6px 0 0; order: 3; }
    .catalog-item-price .price-value { font-size: 16px; }
    .catalog-item-side { order: 1; margin-left: auto; }
    .catalog-item-title { font-size: 16px; }
    .details-specs { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .details-actions .btn { width: 100%; text-align: center; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 36px; }
    .section { padding: 60px 0; }
    .modal-content { padding: 30px 20px; }
    .carousel-btn { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-brand { grid-column: span 1; }
    footer.site-footer { padding: 50px 0 30px; text-align: center; }
    .footer-brand .footer-logo { align-self: center; transform: scale(1); margin: 0 auto 20px; }
    .footer-desc { margin: 0 auto 20px; }
    .contact-block { padding: 25px 18px; }
    .floating-buttons { bottom: 20px; right: 20px; }
    .floating-btn { width: 46px; height: 46px; }
    .contact-modal-info { flex-direction: column; align-items: center; }
    .cookie-banner-content { flex-direction: column; text-align: center; }
    .cookie-banner-buttons { justify-content: center; }
    .legal-content { padding: 30px 20px; }
    .legal-content h1 { font-size: 22px; }
}
/* Форма внутри модалки "Связаться" — компактнее */
.contact-modal-content .modern-form {
    margin: 0;
    gap: 14px;
}

.contact-modal-content .form-field label {
    font-size: 12px;
}

.contact-modal-content .modern-form input[type="text"],
.contact-modal-content .modern-form input[type="tel"] {
    padding: 12px 16px;
    font-size: 15px;
}

.contact-modal-content .form-submit-btn {
    padding: 13px 20px;
    font-size: 15px;
    margin-top: 5px;
}

.contact-modal-content .consent-checkbox label {
    font-size: 12px;
}

/* Скролл в модалке, если экран маленький */
.contact-modal-content {
    max-height: 92vh;
    overflow-y: auto;
}
/* =========================================
   ПРИНУДИТЕЛЬНЫЙ ФИКС КОНТАКТОВ (3 В РЯД)
   ========================================= */
.contacts-wrapper {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
}
@media (max-width: 900px) {
    .contacts-wrapper {
        grid-template-columns: 1fr !important;
    }
}

/* Убираем квадратную окантовку вокруг иконок соцсетей */
.contact-card .contact-icon.social {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
}
.contact-card .contact-icon.social svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Делаем названия соцсетей крупными и белыми */
.contact-card .contact-text h4:only-child {
    font-size: 16px !important;
    color: var(--text-main) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 600 !important;
    margin-bottom: 0 !important;
}