/* Кастомные стили для проекта */

/* CSS-переменные для notification.css */
:root {
    --color-bg: #ffffff;
    --color-text: var(--color-grey-900, #1a1a1a);
    --color-text-lighter: var(--color-grey-500, #6b7280);
    --color-primary-hover: var(--color-green-500, #0CAE7E);
    --color-success: var(--color-green-500, #0CAE7E);
    --color-warning: var(--color-yellow-500, #f59e0b);
    --color-error: var(--color-red-500, #ef4444);
}

/* Поле на полную ширину в grid-сетке формы */
.delivery-form__field--full {
    grid-column: 1 / -1;
}

/* Код цвета в селекте (серый, мельче) */
.color-code {
    color: #999;
    font-size: 0.85em;
}

/* Кнопка "Обновить" в блоке лояльности профиля */
.user-profile__refresh-btn {
    margin-top: 8px;
    width: 100%;
}

/* Таблица бонусов на странице лояльности */
.loyalty-bonuses-table {
    margin-top: 16px;
    margin-bottom: 0;
}

.loyalty-bonuses-table__th {
    text-align: left;
    padding: 10px 0;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-grey-500, #6b7280);
    border-bottom: 1px solid var(--color-grey-300, #e0e0e0);
}

.loyalty-bonuses-table__td {
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-grey-200, #f0f0f0);
}

.loyalty-bonuses-table__plus {
    color: var(--color-green-500, #0CAE7E);
    font-weight: 600;
}

.loyalty-bonuses-table__minus {
    color: var(--color-red-500, #ef4444);
    font-weight: 600;
}

.loyalty-program__bonus-total {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Поворот иконки при открытии блока */
.product-info__button-icon.rotated {
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.product-info__button-icon {
    transition: transform 0.3s ease;
}

/* Стили для блока информации о бренде */
.product-info__brand-section {
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.product-info__brand-header {
    margin-bottom: 15px;
}

.product-info__brand-logo {
    margin-bottom: 15px;
}

.product-info__brand-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-info__brand-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-info__brand-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.product-info__brand-actions .button__icon {
    display: flex;
    align-items: center;
}

/* Стили для маркеров Яндекс.Карты */
.yandex-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.yandex-marker svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.yandex-marker path {
    fill: #0CAE7E;
    transition: fill 0.2s ease;
}

.yandex-marker.yandex-marker--active path {
    fill: #FF0014;
}

/* Стили для кластеров маркеров */
.cluster-marker {
    width: 50px;
    height: 50px;
    background: #FF5733;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    user-select: none;
    transition: transform 0.2s ease;
}

.cluster-marker:hover {
    transform: scale(1.1);
}

/* Стили для подсказок адресов (DaData) */
.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

.address-suggestions:empty {
    display: none;
}

.address-suggestions__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.address-suggestions__item {
    border-bottom: 1px solid #f0f0f0;
}

.address-suggestions__item:last-child {
    border-bottom: none;
}

.address-suggestions__button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text, #1a1a1a);
    transition: background-color 0.2s ease;
}

.address-suggestions__button:hover {
    background-color: #f5f5f5;
}

.address-suggestions__button:focus {
    outline: none;
    background-color: #e8f5e9;
}

/* Позиционирование родительского контейнера */
.delivery-card__address-input {
    position: relative;
}

/* === Стили для списка городов доставки === */
.delivery-cities {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
}

.delivery-cities__title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-text, #1a1a1a);
}

.delivery-cities__search {
    margin-bottom: 30px;
    max-width: 400px;
}

.delivery-cities__groups {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 40px;
}

.delivery-cities__group {
    min-width: 0;
}

.delivery-cities__letter {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.delivery-cities__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.delivery-cities__item {
    margin-bottom: 8px;
}

.delivery-cities__link {
    color: var(--color-text, #1a1a1a);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s ease;
    display: block;
}

.delivery-cities__link:hover {
    text-decoration: underline;
}

.delivery-cities__no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-lighter, #6b7280);
    font-size: 16px;
}

/* Адаптивность для списка городов */
@media (max-width: 1200px) {
    .delivery-cities__groups {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .delivery-cities__groups {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .delivery-cities__groups {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .delivery-cities__title {
        font-size: 20px;
    }

    .delivery-cities__search {
        max-width: 100%;
    }
}

/* === Стили для детальной страницы доставки в город === */
.delivery-city-info {
    margin-top: 20px;
}

.delivery-city-info__intro {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--color-text, #1a1a1a);
}

.delivery-city-info__methods {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.delivery-city-info__method {
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
}

.delivery-city-info__method h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text, #1a1a1a);
}

.delivery-city-info__method p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-lighter, #6b7280);
    margin-bottom: 8px;
}

.delivery-city-info__method p:last-child {
    margin-bottom: 0;
}

.delivery-city-info__back {
    margin-top: 30px;
}

/* Секции на странице доставки города */
.delivery-city-section {
    margin-bottom: 40px;
}

.delivery-city-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.delivery-city-section__content p {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Карта доставки */
.delivery-city-map {
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
}

/* Блокировка скролла body при открытой модалке */
body.body-no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    left: 0;
}

/* Кнопка "Распродано" — неактивная */
button.button--disabled,
button.button--disabled:hover {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

/* Лого бренда: выравнивание по левому краю */
.brand-intro__logo {
    padding-left: 0;
    margin-left: 0;
}
.brand-intro__logo img {
    object-position: left;
}

/* Тултип "любимые бренды": показ по наведению на десктопе */
@media (min-width: 960px) {
    .brand-intro__footer .tooltip:hover .tooltip__wrapper {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* Корзина: товары вверху (scrollable), кнопки внизу (fixed) */
.modal-cart .modal__content {
    display: flex;
    flex-direction: column;
}

.modal-cart .modal__content-non-scrollable {
    order: 2;
}

.modal-cart .modal__content-wrapper {
    order: 1;
    flex: 1;
    min-height: 0;
}

/* Правая колонка checkout — прилипает при прокрутке */
@media (min-width: 960px) {
    .checkout-block__aside {
        position: sticky;
        top: 1.5rem;
        align-self: start;
    }
}

/* Блок состава товара на карточке */
.product-composition {
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
}

.product-composition__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-grey-900, #1a1a1a);
}

.product-composition__group {
    margin-bottom: 16px;
}

.product-composition__group:last-child {
    margin-bottom: 0;
}

.product-composition__group-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-grey-500, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.product-composition__item {
    margin-bottom: 12px;
}

.product-composition__item:last-child {
    margin-bottom: 0;
}

.product-composition__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 14px;
}

.product-composition__name {
    color: var(--color-grey-900, #1a1a1a);
}

.product-composition__percent {
    color: var(--color-grey-500, #6b7280);
    font-weight: 500;
}

.product-composition__bar {
    height: 6px;
    background: var(--color-grey-200, #f0f0f0);
    border-radius: 3px;
    overflow: hidden;
}

.product-composition__fill {
    height: 100%;
    background: var(--color-green-500, #0CAE7E);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Фикс скролла мобильного меню: нативный скролл вместо OverlayScrollbars */
@media (max-width: 959.6px) {
    .nav.is-open .container[data-custom-scrollbar] {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .nav.is-open [data-overlayscrollbars-viewport] {
        overflow-y: auto !important;
    }
}

/* Скрытие блока подписки (неактуальная информация) */
.subscription {
    display: none !important;
}

/* Модалка отзыва: убираем горизонтальный скролл, select не обрезается */
.modal-order-review .modal__content-wrapper {
    overflow: visible;
}
.modal-order-review .modal__content {
    overflow-x: hidden;
}
.modal-order-review .custom-select__list-wrapper {
    position: relative;
    z-index: 10;
}

/* Показ ссылки "Все бельё/одежда →" в мобильном меню */
@media (max-width: 959.6px) {
    .nav__submenu-title.nav__submenu-title--link {
        display: flex !important;
    }
}

/* Inline-сообщения об ошибках под полями: скрытое состояние */
.site-error-message.is-hidden {
    display: none !important;
}
.site-error-message {
    margin-top: 8px;
}

/* ЛК внутри мобильного бургер-меню */
.nav__user-profile {
    margin: 1.5rem 0;
    padding: 0 1rem;
}
.nav__user-profile .user-nav {
    margin-top: 1rem;
}

/* Блок выбора пола в чекауте — на всю ширину строки */
.delivery-form__field.profile-data__gender {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
}
.delivery-form__field.profile-data__gender .site-error-message {
    flex-basis: 100%;
}

/* Скрываем треки OverlayScrollbars внутри кастомных выпадающих списков */
.custom-select__list .os-scrollbar,
.custom-select__list-wrapper .os-scrollbar {
    display: none !important;
}

/* На мобиле центрируем логотип бренда в brand-intro__header */
@media (max-width: 959.6px) {
    .brand-intro__header {
        justify-content: center;
    }
}

/* Модалка "О бренде" на мобиле: нижнее меню user-links не должно перекрывать кнопку "Смотреть каталог бренда" */
@media (max-width: 959.6px) {
    .modal-product-brand__link {
        margin-bottom: 5rem;
    }
}