/* ===== Toast (Bootstrap toast wrapper) ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: -1;
}

.custom-success-toast {
    background-color: #28a745;
    color: white;
    border: none;
}

.custom-success-toast .btn-close {
    filter: brightness(3);
}

/* ===== Fullscreen page loader ===== */
#page-loader {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

#page-loader .loader-logo {
    max-width: 180px;
    margin-bottom: 16px;
}

#page-loader .loader-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    animation: loader-spin 0.9s linear infinite;
}

#page-loader .loader-text {
    margin-top: 12px;
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Footer — mobile layout ===== */
@media (max-width: 767px) {
    .footer { padding-top: 32px; padding-bottom: 32px; }
    .footer .container > .row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 28px;
        text-align: center;
    }
    .footer .container > .row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        padding-left: 0;
        padding-right: 0;
    }
    .footer .footer_logo {
        display: block;
        margin: 0 auto 12px;
        max-width: 180px;
        height: auto;
    }
    .footer p {
        margin: 0;
        font-size: 13px;
        opacity: 0.7;
    }
    .footer .menu_container_footer {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-top: 24px;
        margin-top: 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        width: 100%;
    }
    .footer .menu_container_footer a {
        text-decoration: none;
        color: inherit;
    }
    .footer .menu_container_footer a p {
        margin: 0;
        font-size: 14px;
        opacity: 0.85;
    }
    .footer .col-xl-3:last-child {
        display: flex;
        justify-content: center;
        gap: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }
}

/* ===== Header utility classes (бывшие inline style="…") =====
   Селекторы с .menu img.* — повышаем специфичность, чтобы перебить
   общее правило `.menu img { width: 150px }` из style.css.        */
.header-actions { gap: 10px; }
.menu img.header-icon-wa { margin-left: 0; margin-top: 31px; width: 25px; }
.menu img.header-icon-tg { margin-left: 0; margin-top: 31px; width: auto; }
.header-cta { max-width: 100%; }

/* ===== Footer utility classes (бывшие inline style="…") ===== */
.footer-tel { color: inherit; text-decoration: none; }

/* ===== Yandex.Metrika noscript pixel ===== */
.metrika-pixel { position: absolute; left: -9999px; }

/* ===== Утилитарные классы (бывшие inline style="...") ===== */
.w-max-content { width: max-content; }
.mt-30 { margin-top: 30px; }
.mt-30-special { margin-top: 26.92px; }
.pos-rel-580 { position: relative; min-height: 580px; }
.no-bg { background: none; }
.no-bg-no-shadow { background: none; box-shadow: unset; }
.no-bg-no-shadow-full { background: none; box-shadow: unset; width: 100%; padding: 0; }
.no-bg-no-shadow-auto { background: none; box-shadow: unset; width: auto; padding: 0; }
.no-bg-no-shadow-12 { background: none; box-shadow: unset; width: 100%; padding: 0; gap: 12px; }
.text-link-inherit { text-decoration: none; color: inherit; }
.form-check-row { align-items: center; display: flex; margin-top: 24px; }
.consent-mark { margin-right: 8px; }
.label-inline { align-items: center; display: flex; }
.no-border-bottom { border-bottom: 0; }
.menu-item-pr0 { padding-right: 0; }

/* ===== Submenu (мобильное меню каталога) ===== */
.menu_item1.is-submenu { font-size: 13px; color: #aaa; }

/* ===== Виджет Яндекс.Карт (повторяется на 5 страницах) ===== */
.yandex-map-widget { position: relative; overflow: hidden; }
.yandex-map-attr {
    color: #eee;
    font-size: 12px;
    position: absolute;
    left: 0;
}
.yandex-map-attr--top0 { top: 0; }
.yandex-map-attr--top14 { top: 14px; }
.yandex-map-iframe { position: relative; }

/* ===== Поля формы — ошибка валидации (car_detail) ===== */
.form-field-error {
    color: #e05454;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}
.form-field-error--small { min-height: 8px; }
