/* ============================================================================
   PROFIAVTOGLASS — пользовательские стили
   Файл: /design/dist/css/pvashooot.css
   ============================================================================ */

:root {
    --pag-accent: #CF2127;
}

/* ============================================================================
   01. БАЗОВЫЕ ИСПРАВЛЕНИЯ
   ============================================================================ */

.compensate-for-scrollbar {
    margin-right: 0;
}

.custom-fancybox-review-mod .fancybox-content {
    padding: 0;
}

.custom-fancybox-review-mod .fancybox-content [data-fancybox-close] {
    display: none;
}

/* ============================================================================
   02. ШАПКА: РАСПОЛОЖЕНИЕ И HOVER МЕНЮ
   ============================================================================ */

@media (min-width: 992px) {
    .header-main {
        position: relative;
        z-index: 1000;
    }

    .header-main-holder {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: auto;
    }

    .header-main-holder > .left {
        display: flex;
        align-items: center;
        gap: 35px;
        height: auto;
        width: auto;
    }

    .header-main .menu {
        position: relative;
        z-index: 1001;
        margin: 0;
    }

    .header-main .menu nav a[href] {
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .header-main .menu nav a[href]:hover,
    .header-main .menu nav a[href]:focus-visible {
        color: var(--pag-accent) !important;
        background: transparent !important;
        text-decoration: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
    }

    /* Отключаем прежнее декоративное подчёркивание. */
    .header-main .menu nav li:hover::before,
    .header-main .menu nav li:hover::after,
    .header-main .menu nav li:hover > a::before,
    .header-main .menu nav li:hover > a::after {
        display: none !important;
    }
}

/* ============================================================================
   03. НАВИГАЦИЯ: СКРЫТЫЕ ПУНКТЫ И КНОПКА ЗАЯВКИ
   ============================================================================ */

/* Скрываем «Каталог» и «Новости» в шапке, мобильном меню и футере. */
.header-main .menu li:has(> a[href="/catalog/"]),
#mobile-menu-main li:has(> a[href="/catalog/"]),
.footer .menu li:has(> a[href="/catalog/"]),
.header-main .menu li:has(> a[href="/news/"]),
#mobile-menu-main li:has(> a[href="/news/"]),
.footer .menu li:has(> a[href="/news/"]) {
    display: none !important;
}

/* Десктопная кнопка «Оставить заявку». */
.header-main-holder > .right .action a[href="#make-request"] {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Мобильная кнопка «Оставить заявку». */
#mobile-menu-main .action a[href="#make-request"] {
    display: none !important;
}

/* ============================================================================
   04. ФУТЕР: HOVER НАВИГАЦИОННЫХ ССЫЛОК
   ============================================================================ */

.footer .menu nav ul li > a {
    cursor: pointer;
    transition: color 0.2s ease;
    border: none !important;
    box-shadow: none !important;
    background-image: none !important;
    text-decoration: none !important;
}

.footer .menu nav ul li:hover > a,
.footer .menu nav ul li > a:hover,
.footer .menu nav ul li > a:focus-visible {
    color: var(--pag-accent) !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Отключаем декоративные линии и псевдоэлементы меню. */
.footer .menu nav ul li::before,
.footer .menu nav ul li::after,
.footer .menu nav ul li > a::before,
.footer .menu nav ul li > a::after {
    content: none !important;
    display: none !important;
}

/* ============================================================================
   05. ФОРМЫ, ОТЗЫВЫ И КНОПКА ЗАПИСИ
   ============================================================================ */

/* Стандартная форма обратной связи. */
.mfeedback {
    display: none !important;
}

/* Кнопка «Оставить отзыв». */
a[href="#make-review"] {
    display: none !important;
}

/* Раздел отзывов вместе с его непосредственным контейнером. */
.reviews-block,
div:has(> .reviews-block) {
    display: none !important;
}

/* Кнопка «Записаться» в карточках услуг. */
a[href="#request-glass-service"] {
    display: none !important;
}

/* ============================================================================
   06. УСЛУГИ: КОМПАКТНЫЙ БЛОК ЦЕНЫ И СРОКА
   ============================================================================ */

.image-block .order-block:has(a[href="#request-glass-service"]) {
    width: max-content !important;
    max-width: calc(100% - 24px);
    margin-left: auto !important;
    margin-right: auto !important;
}

.image-block .order-block:has(a[href="#request-glass-service"]) .order-block-holder {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: max-content !important;
    max-width: 100%;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 20px 38px !important;
    box-sizing: border-box;
    text-align: center !important;
}

/* Убираем контейнер уже скрытой кнопки, сохраняя блок цены. */
.image-block .order-block-holder .action:has(a[href="#request-glass-service"]) {
    display: none !important;
}

/* Цена и срок — по центру. */
.image-block .order-block:has(a[href="#request-glass-service"]) .order-block-holder > :not(.action) {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

.image-block .order-block:has(a[href="#request-glass-service"]) .order-block-holder > :not(.action) * {
    text-align: center !important;
}

/* ============================================================================
   07. ГАЛЕРЕЯ «ПРИМЕРЫ РАБОТ»
   ============================================================================ */

/* Скрываем изображения за пределами видимой области Slick-карусели. */
.slick-list:has(.example-image-holder) {
    overflow: hidden !important;
}

/* ============================================================================
   08. МЕССЕНДЖЕРЫ: MAX И TELEGRAM
   ============================================================================ */

/* Убираем старые SVG WhatsApp в ссылках, заменённых на MAX. */
.messengers a[href^="https://max.ru/u/"] .icon svg,
.footer .socials a[href^="https://max.ru/u/"] svg {
    display: none !important;
}

/* Общий значок MAX: чёрный, при наведении — красный. */
.messengers a[href^="https://max.ru/u/"] .icon::before,
.footer .socials a[href^="https://max.ru/u/"]::before {
    content: "";
    background-color: #000;
    -webkit-mask: url("/design/dist/img/max-icon.svg") center / contain no-repeat;
    mask: url("/design/dist/img/max-icon.svg") center / contain no-repeat;
    transition: background-color 0.2s ease;
}

/* Шапка: значок 18 × 18 px рядом с надписью MAX. */
.messengers a[href^="https://max.ru/u/"] .icon::before {
    display: block;
    width: 18px;
    height: 18px;
}

/* Футер: только значок MAX, 24 × 25 px. */
.footer .socials a[href^="https://max.ru/u/"]::before {
    display: inline-block;
    width: 24px;
    height: 25px;
    vertical-align: middle;
}

.messengers a[href^="https://max.ru/u/"] .text {
    transition: color 0.2s ease;
}

.messengers a[href^="https://max.ru/u/"]:hover .text,
.messengers a[href^="https://max.ru/u/"]:focus-visible .text {
    color: var(--pag-accent) !important;
}

.messengers a[href^="https://max.ru/u/"]:hover .icon::before,
.messengers a[href^="https://max.ru/u/"]:focus-visible .icon::before,
.footer .socials a[href^="https://max.ru/u/"]:hover::before,
.footer .socials a[href^="https://max.ru/u/"]:focus-visible::before {
    background-color: var(--pag-accent) !important;
}

/* Telegram: красный текст и иконка при наведении. */
a[href*="t.me/"] {
    cursor: pointer;
    transition: color 0.2s ease;
}

a[href*="t.me/"]:hover,
a[href*="t.me/"]:hover *,
a[href*="t.me/"]:focus-visible {
    color: var(--pag-accent) !important;
    text-decoration: none !important;
}

/* ============================================================================
   09. ГЛАВНАЯ СТРАНИЦА: СКРЫТИЕ БЛОКА «НОВОСТИ»
   ============================================================================ */

main.content > section#news {
    display: none !important;
}

/* ===================================================
   PROFIAVTOGLASS — КНОПКА ЯНДЕКС КАРТ
   =================================================== */

/* Основная кнопка */
.pag-yandex-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 13px 18px;
    border-radius: 10px;
    border: 1px solid #CF2127;

    background: #CF2127 !important;
    color: #ffffff !important;

    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none !important;

    box-shadow: 0 4px 12px rgba(207, 33, 39, 0.16);
    cursor: pointer;

    transition:
        background-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.pag-yandex-link svg {
    display: block;
    flex: 0 0 19px;
    color: #ffffff !important;
}

.pag-yandex-link span {
    color: #ffffff !important;
}

.pag-yandex-arrow {
    font-size: 17px;
    line-height: 1;
    transition: transform .2s ease;
}

/* Hover и управление с клавиатуры */
.pag-yandex-link:hover,
.pag-yandex-link:focus-visible {
    background: #A9191E !important;
    border-color: #A9191E !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 7px 18px rgba(207, 33, 39, 0.26);
    transform: translateY(-2px);
}

.pag-yandex-link:hover .pag-yandex-arrow {
    transform: translate(2px, -2px);
}

.pag-yandex-link:focus-visible {
    outline: 3px solid rgba(207, 33, 39, .3);
    outline-offset: 3px;
}

/* Средние экраны */
@media (min-width: 768px) and (max-width: 1199px) {
    .header-main .pag-yandex-link {
        padding: 10px 12px;
        font-size: 12px;
        gap: 7px;
    }
}

/* Кнопка в мобильном меню */
#mobile-menu-main .pag-yandex-mobile {
    margin: 18px 15px;
}

#mobile-menu-main .pag-yandex-link {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 13px;
    white-space: normal;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .pag-yandex-link,
    .pag-yandex-arrow {
        transition: none;
    }
}

/* ===================================================
   ЯНДЕКС КАРТЫ — КНОПКА В МОБИЛЬНОЙ ШАПКЕ
   =================================================== */

/* Скрыта на компьютерах */
.header-main-holder > .pag-mobile-header-map {
    display: none;
}

@media (max-width: 767px) {

    .header-main-holder {
        position: relative;
    }

    /* Центрируем между бургером и логотипом */
    .header-main-holder > .pag-mobile-header-map {
        display: block !important;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 5;
        width: 200px;
        max-width: calc(100% - 150px);
    }

    .header-main-holder
    > .pag-mobile-header-map .pag-yandex-link {
        display: flex !important;
        width: 100%;
        max-width: 100%;
        min-height: 44px;
        box-sizing: border-box;
        padding: 7px 9px;
        gap: 7px;
        font-size: 11px;
        font-weight: 650;
        line-height: 1.2;
        white-space: normal;
        text-align: left;
        border-radius: 8px;
    }

    .header-main-holder
    .pag-mobile-header-map .pag-yandex-link svg {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }

    .header-main-holder
    .pag-mobile-header-map .pag-yandex-link span {
        min-width: 0;
    }

    /* Убираем стрелку, чтобы освободить место */
    .header-main-holder
    .pag-mobile-header-map .pag-yandex-arrow {
        display: none;
    }
}
