/* ==========================================================================
   Переключатель города: кнопка в шапке + модальное окно с поиском.
   Палитра и шрифты — как в css/css.css: розовый #e61151, градиент
   #e61151 → #f5a462, серые #f2f2f2/#ececf2, шрифты Gilroy-Light и
   Gilroy-ExtraBold (это Inter из fonts/).
   ========================================================================== */

/* --- кнопка в шапке (десктоп) ------------------------------------------- */

.region_selector.city-picker {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    /* css.css тянет сюда картинку-геометку и отступ: теперь иконка своя, внутри кнопки */
    background: none;
    padding-left: 0;
    min-width: 0;
    /* не прилипать к полосе поиска под шапкой */
    margin: 0 0 10px;
    align-items: flex-start;
}

.region_selector .city-picker__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    height: 36px;
    padding: 0 12px 0 11px;
    border: 1px solid #ececf2;
    border-radius: 999px;
    background: #fff;
    color: #2b2b33;
    font-family: 'Gilroy-Light', Arial, sans-serif;
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    border-bottom: 1px solid #ececf2;
    box-shadow: 0 1px 2px rgba(28, 20, 26, .04);
    -webkit-transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
    transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.region_selector .city-picker__btn:hover,
.region_selector .city-picker__btn:focus {
    color: #e61151;
    border-color: #f7c2d2;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(230, 17, 81, .10);
}

.region_selector .city-picker__btn:focus-visible {
    outline: none;
    border-color: #e61151;
    box-shadow: 0 0 0 3px rgba(230, 17, 81, .14);
}

.region_selector .city-picker__btn[aria-expanded="true"] {
    border-color: #e61151;
    box-shadow: 0 0 0 3px rgba(230, 17, 81, .12);
}

.city-picker__pin {
    flex: none;
    color: #e61151;
}

.city-picker__caret {
    flex: none;
    color: #a9a9b8;
    -webkit-transition: transform .15s ease;
    transition: transform .15s ease;
}

.city-picker__btn[aria-expanded="true"] .city-picker__caret {
    transform: rotate(180deg);
}

.city-picker__name {
    min-width: 0;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* «Наши магазины» рядом с кнопкой: на десктопе эта ссылка есть в полосе выше */
.region_selector .openpopupadresses {
    font-family: 'Gilroy-Light', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.2;
    color: #8a8a99;
    text-decoration: none;
    border-bottom: 0;
    cursor: pointer;
    white-space: nowrap;
    position: static;
    top: 0;
    margin: 0;
    padding: 0;
}

.region_selector .openpopupadresses:hover {
    color: #e61151;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (min-width: 769px) {
    .region_selector .openpopupadresses { display: none; }
}

/* «Наши магазины» в той же полосе, что и кнопка города (соседний span6).
   Раньше это была розовая ссылка с точечным подчёркиванием — рядом с кнопкой
   она выглядит как элемент другой вёрстки, поэтому приводим к одному языку. */
.top-adresses .openpopupadresses {
    display: inline-flex;
    align-items: center;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    color: #75757f;
    font-family: 'Gilroy-Light', Arial, sans-serif;
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    -webkit-transition: color .15s ease;
    transition: color .15s ease;
}

.top-adresses .openpopupadresses:hover {
    color: #e61151;
    text-decoration: none;
}

/* --- «Ваш город — ...?» (первый визит, показывает js/addjava.js) --------- */

.region_selector .confirmcity {
    width: 300px;
    box-sizing: border-box;
    padding: 14px 16px 16px;
    left: 0;
    top: calc(100% + 10px);
    border: 1px solid #f0f0f4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(28, 20, 26, .16);
}

.region_selector .confirmcity .triangle-up {
    display: none;
}

.region_selector .confirmcity .cityname {
    margin: 0 0 12px;
    font-family: 'Gilroy-Light', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.35;
    color: #57575f;
}

.region_selector .confirmcity .cityname strong {
    font-family: 'Gilroy-ExtraBold', Arial, sans-serif;
    color: #1f1f27;
}

.region_selector .confirmcity__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.region_selector .confirmcity .acceptcity {
    min-width: 0;
    padding: 9px 14px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(92deg, #e61151 0%, #f5a462 100%);
    color: #fff;
    font-family: 'Gilroy-Light', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.region_selector .confirmcity .acceptcity.choosecity {
    background: #fff;
    border: 1px solid #f5c9d8;
    color: #e61151;
}

.region_selector .confirmcity .acceptcity:hover {
    filter: brightness(.97);
}

/* --- мобильная полоса (фиксированная шапка на розовом градиенте) --------- */
/* В ячейку mobilepanel попадает тот же блок: пилюля с рамкой там не помещается,
   поэтому это текстовая кнопка — геометка + название, «Наши магазины» под ней. */

@media (max-width: 1024px) {
    .region_selector.city-picker {
        display: block;
        line-height: 1.1;
        background: none;
        padding-left: 0;
    }

    .region_selector .city-picker__btn {
        display: inline-flex;
        gap: 5px;
        height: auto;
        max-width: 100%;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
        color: #fff;
        font-size: 13px;
        line-height: 1.15;
    }

    .region_selector .city-picker__btn:hover,
    .region_selector .city-picker__btn:focus {
        color: #fff;
        box-shadow: none;
        text-decoration: underline;
        text-decoration-color: rgba(255, 255, 255, .6);
        text-underline-offset: 3px;
    }

    .region_selector .city-picker__btn:focus-visible {
        outline: 2px solid rgba(255, 255, 255, .85);
        outline-offset: 2px;
    }

    .city-picker__pin {
        width: 12px;
        height: 12px;
        color: #fff;
        opacity: .92;
        position: relative;
        top: 1px;
    }

    .city-picker__caret { display: none; }

    .city-picker__name { max-width: 100%; }

    .region_selector .openpopupadresses {
        display: block;
        margin-top: 3px;
        font-size: 10px;
        line-height: 1.1;
        color: rgba(255, 255, 255, .86);
        text-decoration: underline;
        text-decoration-color: rgba(255, 255, 255, .38);
        text-underline-offset: 2px;
    }

    .region_selector .openpopupadresses:hover { color: #fff; }
}

/* --- модальное окно ------------------------------------------------------ */

.cp-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(26, 20, 24, .5);
    opacity: 0;
    visibility: hidden;
    -webkit-transition: opacity .16s ease, visibility 0s linear .16s;
    transition: opacity .16s ease, visibility 0s linear .16s;
}

.cp-overlay--open {
    opacity: 1;
    visibility: visible;
    -webkit-transition: opacity .16s ease, visibility 0s;
    transition: opacity .16s ease, visibility 0s;
}

.cp-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 520px;
    max-height: 84vh;
    max-height: min(84vh, 660px);
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(28, 20, 26, .24);
    color: #2b2b33;
    font-family: 'Gilroy-Light', Arial, sans-serif;
    transform: translateY(10px);
    -webkit-transition: transform .16s ease;
    transition: transform .16s ease;
}

.cp-overlay--open .cp-modal { transform: none; }

.cp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 0;
}

.cp-title {
    margin: 0;
    padding: 4px 0 0;
    font-family: 'Gilroy-ExtraBold', Arial, sans-serif;
    font-size: 19px;
    line-height: 1.25;
    color: #1f1f27;
    text-transform: none;
    border: 0;
}

.cp-close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f5f5f8;
    color: #6f6f7c;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-transition: background .15s ease, color .15s ease;
    transition: background .15s ease, color .15s ease;
}

.cp-close:hover { background: #fdeef3; color: #e61151; }

.cp-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 17, 81, .14);
}

.cp-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 16px 22px 18px;
}

/* поиск */
.cp-search { position: relative; flex: none; }

.cp-search__icon {
    position: absolute;
    top: 50%;
    left: 14px;
    margin-top: -8px;
    display: flex;
    color: #a7a7b6;
    pointer-events: none;
}

.cp-search .cp-search__input {
    display: block;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 42px 0 40px;
    box-sizing: border-box;
    border: 1px solid #e6e6ee;
    border-radius: 12px;
    background: #fafafc;
    color: #2b2b33;
    font-family: 'Gilroy-Light', Arial, sans-serif;
    font-size: 15px;
    line-height: normal;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    -webkit-transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.cp-search .cp-search__input:focus {
    outline: none;
    border-color: #e61151;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(230, 17, 81, .12);
}

.cp-search .cp-search__input::-webkit-input-placeholder { color: #a7a7b6; }
.cp-search .cp-search__input::placeholder { color: #a7a7b6; }

.cp-search__clear {
    position: absolute;
    top: 50%;
    right: 8px;
    margin-top: -15px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f1f6;
    color: #7b7b88;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.cp-search__clear--show { display: flex; }
.cp-search__clear:hover { background: #fdeef3; color: #e61151; }

/* список городов */
.cp-list {
    flex: 1 1 auto;
    min-height: 0;
    margin: 12px -6px 0 0;
    padding-right: 6px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.cp-list::-webkit-scrollbar { width: 6px; }
.cp-list::-webkit-scrollbar-thumb { background: #e4e4ec; border-radius: 3px; }
.cp-list::-webkit-scrollbar-track { background: transparent; }

/* Список из базы приходит плоским <ul>, группы по буквам собирает скрипт */
.cp-list .cp-cities,
.cp-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cp-group + .cp-group { margin-top: 2px; }

.cp-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cp-group--hidden { display: none; }

.cp-group__letter {
    flex: none;
    width: 18px;
    padding: 12px 0 0;
    font-family: 'Gilroy-ExtraBold', Arial, sans-serif;
    font-size: 12px;
    line-height: 1;
    color: #9a9aa9;
    text-align: center;
    text-transform: uppercase;
}

.cp-group__items {
    flex: 1 1 auto;
    min-width: 0;
}

.cp-modal .cp-city {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    border: 0;
    color: #2b2b33;
    font-family: 'Gilroy-Light', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.3;
    text-decoration: none;
    -webkit-transition: background .12s ease, color .12s ease;
    transition: background .12s ease, color .12s ease;
}

.cp-modal .cp-city:hover {
    background: #fff5f8;
    color: #e61151;
    text-decoration: none;
}

.cp-modal .cp-city:focus-visible {
    outline: none;
    background: #fff5f8;
    box-shadow: inset 0 0 0 2px #f7c2d2;
}

.cp-modal .cp-city--hidden { display: none; }

.cp-modal .cp-city--current {
    background: #fff1f6;
    color: #e61151;
    font-family: 'Gilroy-ExtraBold', Arial, sans-serif;
}

.cp-modal .cp-city--current:hover { background: #ffe9f1; }

.cp-city__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-city__badge {
    flex: none;
    padding: 5px 8px;
    border-radius: 999px;
    background: #e61151;
    color: #fff;
    font-family: 'Gilroy-Light', Arial, sans-serif;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cp-empty {
    display: none;
    margin: 14px 0 0;
    padding: 18px 4px 8px;
    color: #8a8a99;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.cp-empty--show { display: block; }

.cp-note {
    margin: 16px 0 4px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fafafc;
    color: #6f6f7c;
    font-size: 14px;
    line-height: 1.45;
}

.cp-loading {
    padding: 20px 4px;
    color: #8a8a99;
    font-size: 14px;
}

body.cp-locked { overflow: hidden; }

/* --- мобильное окно: на весь экран -------------------------------------- */

@media (max-width: 640px) {
    .cp-overlay {
        display: flex;
        align-items: stretch;
        padding: 0;
    }

    .cp-modal {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
        transform: translateY(14px);
    }

    .cp-head {
        padding: calc(16px + env(safe-area-inset-top)) 16px 0;
    }

    .cp-title { font-size: 17px; padding-top: 6px; }

    .cp-body {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    }

    /* 16px — чтобы iOS не увеличивал страницу при фокусе в поле */
    .cp-search .cp-search__input {
        height: 48px;
        font-size: 16px;
        padding-left: 42px;
    }

    .cp-list { margin-top: 10px; }

    .cp-modal .cp-city {
        padding: 14px 10px;
        font-size: 16px;
    }

    .cp-group__letter { padding-top: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .cp-overlay,
    .cp-modal,
    .region_selector .city-picker__btn,
    .city-picker__caret,
    .cp-modal .cp-city {
        -webkit-transition: none;
        transition: none;
    }
    .cp-modal,
    .cp-overlay--open .cp-modal { transform: none; }
}

/* --- «Наши магазины»: кнопка в стиле выбора города + попап-карточка --------- */
.top-adresses .shops-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 12px;
    margin: 0 0 10px;
    border: 1px solid #ececf2;
    border-radius: 999px;
    background: #fff;
    color: #2b2b33;
    font-family: 'Gilroy-Light', Arial, sans-serif;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(28, 20, 26, .04);
    transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.top-adresses .shops-btn:hover,
.top-adresses .shops-btn:focus-visible {
    color: #e61151;
    border-color: #f7c2d2;
    box-shadow: 0 6px 16px rgba(230, 17, 81, .10);
    outline: none;
}
.shops-btn__pin { flex: none; color: #e61151; }
.shops-btn__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fdeef3;
    color: #e61151;
    font-size: 12px;
    font-weight: 600;
}
@media (max-width: 1024px) {
    .top-adresses .shops-btn {
        height: auto; padding: 0; border: 0; background: none; box-shadow: none;
        color: #fff; font-size: 10px; gap: 4px; margin: 3px 0 0;
    }
    .shops-btn__pin { color: #fff; width: 11px; height: 11px; }
    .shops-btn__count { background: rgba(255,255,255,.22); color: #fff; height: 16px; min-width: 16px; font-size: 10px; }
}

/* попап магазинов — та же карточка, что у выбора города */
.openadresses {
    width: 420px;
    max-width: calc(100vw - 32px);
    max-height: 70vh;
    overflow-y: auto;
    padding: 18px 18px 12px;
    border: 1px solid #f0f0f4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(28, 20, 26, .22);
    text-align: left;
}
.openadresses .adresses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.openadresses .contact_item { display: flex; gap: 10px; padding: 10px; border: 1px solid #f2f2f6; border-radius: 12px; }
.openadresses .contact_item .img img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.openadresses .name_phone .name { font-size: 13.5px; font-weight: 600; color: #2b2b33; }
.openadresses .name_phone .phone a { font-size: 12.5px; color: #e61151; text-decoration: none; }
.openadresses .closeadresses { margin-top: 12px; text-align: center; color: #8a8a99; font-size: 12.5px; cursor: pointer; }
@media (max-width: 768px) {
    .openadresses { width: calc(100vw - 24px); left: 12px !important; max-height: 76vh; }
    .openadresses .adresses { grid-template-columns: 1fr; }
}

/* «Наши магазины» — окно по центру, как выбор города (перекрываем старый дропдаун) */
.openadresses {
    position: fixed !important;
    top: 50% !important; left: 50% !important; right: auto !important; bottom: auto !important;
    transform: translate(-50%, -50%);
    display: none;
    width: 520px; max-width: calc(100vw - 32px);
    max-height: 78vh; overflow-y: auto;
    padding: 20px 20px 14px;
    border: 0; border-radius: 18px; background: #fff;
    box-shadow: 0 24px 60px rgba(28, 20, 26, .28);
    z-index: 2001;
}
.shops-backdrop {
    position: fixed; inset: 0;
    background: rgba(26, 20, 24, .5);
    z-index: 2000;
}
.openadresses.is-open { display: block !important; }
.openadresses .adresses { grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 768px) {
    .openadresses { width: calc(100vw - 24px); max-height: 80vh; }
    .openadresses .adresses { grid-template-columns: 1fr; }
}

/* затемнение поверх страницы и нормальные карточки магазинов */
.shops-backdrop { z-index: 2100 !important; position: fixed; inset: 0; background: rgba(26,20,24,.5); }
.openadresses { z-index: 2101 !important; }
.openadresses .adresses { grid-template-columns: 1fr !important; gap: 8px; }
.openadresses .contact_item { align-items: center; padding: 8px 10px; }
.openadresses .contact_item .img img { width: 48px; height: 48px; }
.openadresses .name_phone { min-width: 0; }
.openadresses .name_phone .name { white-space: normal; }
.openadresses .name_phone .phone a { white-space: nowrap; }

/* окно магазинов: две колонки, без внутренней прокрутки, крупнее фото */
.openadresses {
    width: 760px !important;
    max-width: calc(100vw - 32px) !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 22px 22px 14px !important;
}
.openadresses .adresses {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
}
.openadresses .contact_item { gap: 12px; padding: 10px 12px; }
.openadresses .contact_item .img img { width: 76px; height: 76px; border-radius: 12px; }
.openadresses .name_phone .name { font-size: 14.5px; line-height: 1.3; }
.openadresses .name_phone .phone a { font-size: 13.5px; }
@media (max-width: 860px) {
    .openadresses { width: calc(100vw - 24px) !important; }
    .openadresses .adresses { grid-template-columns: 1fr !important; }
}

/* гарантируем сетку именно у списка и вписываем окно в экран */
.openadresses ul.adresses {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 14px; row-gap: 10px;
}
.openadresses ul.adresses > li { display: block; }
.openadresses .contact_item .img img { width: 64px !important; height: 64px !important; }
.openadresses { width: 700px !important; max-height: calc(100vh - 60px) !important; overflow-y: auto !important; }
@media (max-width: 860px) {
    .openadresses ul.adresses { grid-template-columns: 1fr !important; }
}

/* карточка магазина — на всю ширину колонки */
.openadresses ul.adresses > li,
.openadresses ul.adresses > li .contact_item { width: 100% !important; box-sizing: border-box; }
.openadresses ul.adresses > li .contact_item { display: flex; align-items: center; }
.openadresses .name_phone { flex: 1 1 auto; min-width: 0; }
.openadresses .name_phone .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* фото магазинов крупнее; на мобиле — компактнее, чтобы окно влезало */
.openadresses .contact_item .img img { width: 92px !important; height: 92px !important; border-radius: 14px; }
.openadresses ul.adresses { row-gap: 8px; }
.openadresses .contact_item { padding: 8px 10px; }
@media (max-width: 860px) {
    .openadresses .contact_item .img img { width: 64px !important; height: 64px !important; }
}

/* мобильная адаптация окна магазинов: не шире экрана, без горизонтального скролла */
@media (max-width: 860px) {
    .openadresses {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        box-sizing: border-box !important;
        padding: 14px 12px 10px !important;
        max-height: calc(100vh - 24px) !important;
        overflow-y: auto !important;
    }
    .openadresses ul.adresses { grid-template-columns: 1fr !important; gap: 8px; }
    .openadresses .contact_item { gap: 10px; padding: 8px; }
    .openadresses .name_phone .name { font-size: 13.5px; }
    .openadresses .name_phone .phone a { font-size: 12.5px; }
}

/* магазины: крупные фото 200px, три колонки на десктопе */
.openadresses {
    width: 1120px !important;
    max-width: calc(100vw - 40px) !important;
    max-height: calc(100vh - 40px) !important;
}
.openadresses ul.adresses {
    grid-template-columns: repeat(3, 1fr) !important;
    column-gap: 14px; row-gap: 14px;
}
.openadresses ul.adresses > li .contact_item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
}
.openadresses .contact_item .img img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover;
    border-radius: 12px;
}
.openadresses .name_phone .name { white-space: normal; font-size: 14.5px; }
@media (max-width: 1200px) {
    .openadresses ul.adresses { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 860px) {
    .openadresses ul.adresses { grid-template-columns: 1fr !important; }
    .openadresses .contact_item .img img { width: 100% !important; height: 160px !important; }
}

/* вписываем 3 ряда в экран: фото 150px, компактные отступы */
.openadresses .contact_item .img img { height: 150px !important; }
.openadresses ul.adresses { row-gap: 10px; }
.openadresses ul.adresses > li .contact_item { padding: 8px; gap: 6px; }
.openadresses .name_phone .phone a { font-size: 13px; }

/* фото магазина: не растягиваем, ограничиваем ширину 200px и держим пропорции */
.openadresses .contact_item .img { text-align: center; }
.openadresses .contact_item .img img,
.openadresses .contact_item .img a {
    display: block;
    max-width: 200px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto;
    border-radius: 12px;
}

/* окно компактнее: карточки уже, пустоты по краям меньше */
.openadresses {
    width: 900px !important;
    max-width: calc(100vw - 40px) !important;
    padding: 18px 18px 10px !important;
}
.openadresses ul.adresses { column-gap: 12px; row-gap: 12px; }
.openadresses ul.adresses > li .contact_item { padding: 10px 8px; }

/* «Наши магазины» в штатном facebox — оформление как у окна выбора города */
.shops-facebox .adresses {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px;
    list-style: none; margin: 0; padding: 0;
}
.shops-facebox .contact_item {
    display: flex; flex-direction: column; gap: 8px;
    padding: 10px; border: 1px solid #f2f2f6; border-radius: 12px;
}
.shops-facebox .contact_item .img { text-align: center; }
.shops-facebox .contact_item .img img {
    max-width: 200px; width: auto; height: auto;
    display: block; margin: 0 auto; border-radius: 12px;
}
.shops-facebox .name_phone .name { font-size: 14.5px; line-height: 1.3; color: #2b2b33; }
.shops-facebox .name_phone .phone a { font-size: 13.5px; color: #e61151; text-decoration: none; }
.shops-facebox .closeadresses { margin-top: 14px; text-align: center; color: #8a8a99; font-size: 13px; cursor: pointer; }
@media (max-width: 860px) {
    .shops-facebox .adresses { grid-template-columns: 1fr !important; }
}

/* facebox не должен вылезать за экран: контент со своей прокруткой */
.shops-facebox .contact_item .img img { max-height: 150px; }
.shops-facebox .adresses { row-gap: 10px; }

/* facebox для магазинов: шире, колонки ровные, телефон в строку */
.shops-facebox .adresses { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; column-gap: 16px; }
.shops-facebox .contact_item .img img { max-width: 100%; height: auto; }
.shops-facebox .name_phone .name { white-space: normal; }
.shops-facebox .name_phone .phone a { white-space: nowrap; }

/* фото в facebox: фиксированная ширина, пропорции, по центру */
.shops-facebox .contact_item .img { width: 100%; text-align: center; }
.shops-facebox .contact_item .img img {
    width: 200px !important; max-width: 100% !important; height: auto !important;
    display: block !important; margin: 0 auto; border-radius: 12px; background: #f4f1f4;
}

/* «Наши магазины» — та же модалка, что у выбора города (.cp-*) */
.cp-modal--shops { max-width: 1180px; }
.cp-overlay--shops .cp-body { padding: 14px 22px 20px; overflow-y: auto; }
.openadresses-inner .adresses {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px; list-style: none; margin: 0; padding: 0;
}
.openadresses-inner .contact_item {
    display: flex; flex-direction: column; gap: 8px;
    padding: 10px; border: 1px solid #f2f2f6; border-radius: 12px;
}
.openadresses-inner .contact_item .img { text-align: center; }
.openadresses-inner .contact_item .img img {
    width: 200px; max-width: 100%; height: auto; display: block; margin: 0 auto;
    border-radius: 12px; background: #f4f1f4;
}
.openadresses-inner .name { font-size: 14.5px; line-height: 1.3; color: #2b2b33; }
.openadresses-inner .phone a { font-size: 13.5px; color: #e61151; text-decoration: none; white-space: nowrap; }
@media (max-width: 860px) {
    .openadresses-inner .adresses { grid-template-columns: 1fr; }
    .cp-overlay--shops .cp-body { padding: 10px 14px 16px; }
}

/* без внутренней прокрутки + фото 200px слева от текста */
.cp-overlay--shops .cp-body { overflow: visible !important; max-height: none !important; }
.cp-modal--shops { max-height: none !important; max-width: 1240px; }
.openadresses-inner .contact_item { flex-direction: row; align-items: center; gap: 12px; }
.openadresses-inner .contact_item .img { flex: 0 0 200px; width: 200px; }
.openadresses-inner .contact_item .img img { width: 200px !important; max-width: 200px !important; height: auto !important; }
.openadresses-inner .name_phone { flex: 1 1 auto; min-width: 0; }
@media (max-width: 860px) {
    .openadresses-inner .contact_item { flex-direction: column; align-items: stretch; }
    .openadresses-inner .contact_item .img { flex: none; width: 100%; }
    .openadresses-inner .contact_item .img img { width: 100% !important; max-width: 100% !important; }
}

/* вписываем окно магазинов в экран по высоте */
.cp-overlay--shops { padding: 10px !important; }
.cp-overlay--shops .cp-head { padding: 12px 18px 0 !important; }
.cp-overlay--shops .cp-body { padding: 8px 18px 12px !important; }
.openadresses-inner .adresses { gap: 8px !important; }
.openadresses-inner .contact_item { padding: 6px 8px !important; }

/* карточки не растягиваются: фиксированная ширина, по центру, отступы плотнее */
.openadresses-inner .adresses {
    grid-template-columns: repeat(3, minmax(0, 372px)) !important;
    justify-content: center;
    column-gap: 10px !important;
    row-gap: 8px !important;
}
.openadresses-inner .contact_item { padding: 6px 8px !important; }

/* убираем лишние отступы между карточками магазинов */
.openadresses-inner .adresses {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    column-gap: 6px !important;
    row-gap: 6px !important;
}
.openadresses-inner .adresses > li { margin: 0 !important; padding: 0 !important; }
.openadresses-inner .contact_item { margin: 0 !important; padding: 6px !important; gap: 4px !important; }
.openadresses-inner .name_phone .name,
.openadresses-inner .name_phone .phone { margin: 0 !important; }

/* фиксированная панель: город и «круглосуточно, 7 дней в неделю» по одной линии */
.fixedpanel table.city_text { border-collapse: collapse; }
.fixedpanel table.city_text td { vertical-align: middle !important; padding: 0; }
.fixedpanel table.city_text td + td { padding-left: 12px; }
.fixedpanel table.city_text .toptext { margin: 0 !important; line-height: 1.2; font-size: 13px; }
.fixedpanel .region_selector.city-picker { margin: 0 !important; }
.fixedpanel .region_selector .city-picker__btn { height: 32px; }

/* фиксированная панель: город и «круглосуточно…» в одну линию */
.fixedpanel .hleft { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 6px; }
.fixedpanel .hleft .phones { width: 100%; margin: 0; }
.fixedpanel table.city_text,
.fixedpanel table.city_text tbody,
.fixedpanel table.city_text tr { display: flex; align-items: center; gap: 12px; margin: 0; }
.fixedpanel table.city_text td { display: block; }

/* фиксированная панель: город рядом с телефоном, без «круглосуточно» */
.fixedpanel .hleft { display: flex; align-items: center; gap: 16px; }
.fixedpanel .hleft .phones { margin: 0 !important; width: auto !important; }
.fixedpanel .hleft .phones li { margin: 0 !important; }
.fixedpanel .hleft .city_text { display: flex; align-items: center; margin: 0; }
.fixedpanel .hleft .region_selector.city-picker { margin: 0 !important; }

/* фиксированная панель: всё по одной вертикальной оси */
.fixedpanel .two-columns,
.fixedpanel .two-columns > tbody > tr > td { vertical-align: middle !important; }
.fixedpanel .leftpanel { display: flex; align-items: center; gap: 14px; height: 100%; }
.fixedpanel .leftpanel .logo { margin: 0 !important; line-height: 0; }
.fixedpanel .leftpanel .logo img { max-height: 46px; width: auto; }
.fixedpanel .leftpanel .underlogo { margin: 0 !important; line-height: 1.25; }
.fixedpanel .hleft { display: flex; align-items: center; gap: 16px; margin: 0 !important; }
.fixedpanel .hleft .phones { margin: 0 !important; display: flex; align-items: center; }
.fixedpanel .hleft .phones li { margin: 0 !important; line-height: 1; }
.fixedpanel .hleft .city_text { display: flex; align-items: center; margin: 0; }
.fixedpanel .hleft .region_selector.city-picker { margin: 0 !important; align-items: center; }
.fixedpanel .hright { display: flex; align-items: center; justify-content: flex-end; }
.fixedpanel .hright .row-fluid { display: flex; align-items: center; gap: 10px; margin: 0 !important; }
.fixedpanel .hright .row-fluid > [class*="span"] { float: none !important; width: auto !important; margin: 0 !important; }
.fixedpanel ul.social { display: flex; align-items: center; gap: 6px; margin: 0 !important; padding: 0 !important; }
.fixedpanel ul.social li { display: flex; align-items: center; margin: 0 !important; }
.fixedpanel .basket-place { display: flex; align-items: center; margin: 0 !important; }
.fixedpanel .basket_container { display: flex; align-items: center; }
.fixedpanel .site .wrapper { padding-top: 6px; padding-bottom: 6px; }

/* соцсети и корзина в панели — разнести визуально */
.fixedpanel .hright .row-fluid { gap: 22px !important; }
.fixedpanel .hright .basket-place {
    padding-left: 18px !important;
    margin-left: 4px !important;
    border-left: 1px solid #e6e2e6;
    min-height: 26px;
    display: flex;
    align-items: center;
}
.fixedpanel ul.social { gap: 8px !important; }

/* панель: у левой колонки убираем верхний отступ (был из общего CSS) */
.fixedpanel .leftpanel { padding-top: 0 !important; }
