:root[data-theme="dark"] { 
    --dark-bg: #0f0f11; 
    --header-bg: rgba(15, 15, 17, 0.9); 
    --card-bg: #18181c; 
    --border-color: #2a2a30; 
    --text-main: #f1f1f3; 
    --text-muted: #9ba1a6; 
    --nav-bg: #141418; 
    --input-bg: #0f0f11; 
    --price-color: #ffffff; 
}
:root[data-theme="light"] { 
    --dark-bg: #f4f5f7; 
    --header-bg: rgba(255, 255, 255, 0.9); 
    --card-bg: #ffffff; 
    --border-color: #e2e8f0; 
    --text-main: #1e293b; 
    --text-muted: #64748b; 
    --nav-bg: #ffffff; 
    --input-bg: #f8fafc; 
    --price-color: #000000; 
}
:root { 
    --primary: #e52e2e; 
    --primary-hover: #c72525; 
    --transition: all 0.3s ease; 
}
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Montserrat', sans-serif; 
}
body { 
    background-color: var(--dark-bg); 
    color: var(--text-main); 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    transition: var(--transition); 
}

/* --- 1. ЖЕСТКАЯ ПРИВЯЗКА ЦВЕТА ЦЕН К ТЕМЕ (БЕЛЫЙ/ЧЕРНЫЙ) --- */
.price-tag, .car-price, .m-bar-price, .price-val {
    color: var(--price-color) !important;
}

/* --- 2. ИСПРАВЛЕНИЕ СЕТКИ ХАРАКТЕРИСТИК (ПРОБЕГ И КОРОБКА В ОДИН РЯД) --- */
.car-specs {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 10px !important;
    font-size: 13px !important;
    color: var(--text-muted);
    margin-bottom: 15px;
    align-items: center;
}
.car-specs span {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.car-specs i {
    width: 16px;
    text-align: center;
    color: var(--text-muted); 
}

/* --- 3. АВТОМАТИЧЕСКИЙ ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ ДЛЯ PHP --- */
html[lang="ro"] .lang-ru { display: none !important; }
html[lang="ru"] .lang-ro { display: none !important; }


/* --- ШАПКА И ОСТАЛЬНЫЕ СТИЛИ --- */
header { background: var(--header-bg); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(10px); }
.header-container { max-width: 1200px; margin: 0 auto; padding: 8px 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.logo-area { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-area img { height: 160px !important; width: max-content !important; max-width: 300px !important; object-fit: contain !important; display: block; }
.header-middle { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.phones-column { display: flex; flex-direction: column; gap: 6px; }
.phones-column a { color: var(--text-main); text-decoration: none; display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; transition: var(--transition); }
.phones-column a:hover { color: var(--primary); }
.phones-column i { color: var(--primary); font-size: 16px; }
.work-hours-block { display: flex; align-items: center; border-left: 1px solid var(--border-color); padding-left: 25px; }
.work-hours-column { display: flex; flex-direction: column; gap: 6px; }
.wh-row { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.wh-row i { font-size: 16px; margin: 0; }
.wh-row span { color: var(--text-main); font-size: 14px; font-weight: 600; display: inline-block; white-space: nowrap; margin: 0; }
.settings-bar { display: flex; gap: 10px; align-items: center; }
.select-lang, .select-curr, .theme-btn { background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-main); padding: 6px 12px; border-radius: 8px; cursor: pointer; outline: none; font-size: 13px; }

/* --- НАВИГАЦИЯ --- */
nav { background: var(--nav-bg); border-bottom: 1px solid var(--border-color); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; gap: 30px; overflow-x: auto; }
.nav-link { padding: 18px 0 6px 0; margin-bottom: 8px; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; transition: var(--transition); white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--text-main); border-bottom-color: var(--primary); }

/* --- ОБЩИЕ ЭЛЕМЕНТЫ КОНТЕНТА --- */
.main-content { max-width: 1200px; margin: 40px auto; padding: 0 20px; width: 100%; flex: 1; }
.page-header { text-align: center; max-width: 850px; margin: 0 auto 40px auto; line-height: 1.6; }
.page-header h1 { font-size: 36px; font-weight: 800; margin-bottom: 15px; }
.page-header p { font-size: 16px; color: var(--text-muted); }

/* --- ФУТЕР --- */
.site-footer { background: var(--nav-bg); border-top: 1px solid var(--border-color); padding: 60px 20px 20px; color: var(--text-muted); font-size: 14px; margin-top: auto; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; align-items: start; }
@media(max-width: 768px) { .footer-container { grid-template-columns: 1fr; gap: 40px; text-align: left; } }
.footer-logo { height: 50px; margin-bottom: 20px; object-fit: contain; display: block; }
.footer-col h4 { color: var(--text-main); font-size: 16px; font-weight: 700; margin-bottom: 20px; text-transform: uppercase; }
.footer-nav, .footer-contact-list { list-style: none; padding: 0; margin: 0; }
.footer-nav li, .footer-contact-list li { margin-bottom: 12px; display: flex; align-items: flex-start; gap: 10px; }
.footer-nav a, .footer-contact-list a { color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.footer-nav a:hover, .footer-contact-list a:hover { color: var(--primary); }
.footer-bottom { max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--border-color); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; font-size: 12px; }
.footer-policies { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-policies a { color: var(--text-muted); text-decoration: none; font-size: 12px; transition: var(--transition); }
.footer-policies a:hover { color: var(--primary); }

/* МОБИЛЬНАЯ ВЕРСИЯ ШАПКИ */
@media (max-width: 768px) {
    .header-container { flex-direction: column; align-items: center; text-align: center; padding: 15px; gap: 15px; }
    .logo-area { width: 100%; display: flex; justify-content: center; }
    .logo-area img { height: 45px !important; width: auto !important; max-width: 100% !important; }
    .header-middle { flex-direction: column; width: 100%; gap: 15px; align-items: center; }
    .phones-column { flex-direction: row; justify-content: center; gap: 25px; width: 100%; }
    .phones-column a { font-size: 16px; }
    .work-hours-block { flex-direction: column; align-items: center; border-left: none; border-top: 1px solid var(--border-color); padding-left: 0; padding-top: 15px; width: 100%; gap: 8px; }
    .work-hours-column { align-items: center; }
    .settings-bar { width: 100%; justify-content: center; padding-top: 5px; }
}

/* --- МОБИЛЬНЫЙ STICKY-БАР --- */
.mobile-car-sticky-bar { display: none; }
@media (max-width: 768px) {
    .mobile-car-sticky-bar { display: flex !important; position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; height: 70px !important; background: var(--card-bg) !important; border-top: 1px solid var(--border-color) !important; padding: 0 15px !important; z-index: 999999 !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important; box-shadow: 0 -4px 20px rgba(0,0,0,0.2) !important; }
    .m-bar-price { font-size: 18px !important; font-weight: 800 !important; color: var(--primary) !important; white-space: nowrap !important; }
    .m-bar-actions { display: flex !important; gap: 8px !important; flex: 1 !important; justify-content: flex-end !important; }
    .m-bar-btn { height: 44px !important; padding: 0 14px !important; border-radius: 10px !important; font-weight: 700 !important; font-size: 13px !important; text-decoration: none !important; display: flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important; cursor: pointer !important; border: none !important; white-space: nowrap !important; }
    .m-bar-phone { background: var(--dark-bg) !important; color: var(--text-main) !important; border: 1px solid var(--border-color) !important; font-size: 16px !important; width: 44px !important; padding: 0 !important; }
    .m-bar-order { background: var(--primary) !important; color: #fff !important; flex: 1 !important; box-shadow: 0 4px 12px rgba(229, 46, 46, 0.3) !important; }
    body { padding-bottom: 80px !important; }
}