/* Витрина ЭПЛ X: шапка, навигация, выпадающий каталог, мобильное меню, подвал. */

/* ================= шапка PC ================= */
.eplx-header {
    position: relative;
    z-index: 100;
    background: var(--eplx-bg);
    border-bottom: 1px solid var(--eplx-line-3);
}
.eplx-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    height: var(--eplx-header-h);
    padding-top: 16px;
}
.eplx-header__logo { flex: none; width: 117px; }
.eplx-header__logo img { width: 117px; height: 44px; }
.eplx-header__tools { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.eplx-header__btn {
    flex: none;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: var(--eplx-radius);
    background: var(--eplx-card);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 600 var(--eplx-body-s) var(--eplx-font);
    transition: background-color .2s;
}
.eplx-header__btn:hover, .eplx-header__btn.is-active { background: #1c1c1c; }
.eplx-header__search { flex: 1; min-width: 0; position: relative; }

.eplx-header__city {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--eplx-gray-2);
    text-align: left;
}
.eplx-header__city .eplx-icon { opacity: .5; color: var(--eplx-white); }
.eplx-header__city-name { display: block; font: 600 var(--eplx-body-s) var(--eplx-font); }
.eplx-header__city-link { display: block; margin-top: -6px; font: 400 var(--eplx-caption) var(--eplx-font); }
.eplx-header__city:hover { color: var(--eplx-gray); }

.eplx-header__icons { position: relative; flex: none; display: flex; gap: 12px; }
.eplx-header__icon { position: relative; display: block; width: 24px; height: 24px; }
.eplx-header__icon .eplx-icon { opacity: .5; transition: opacity .2s; }
.eplx-header__icon:hover .eplx-icon { opacity: 1; }

/* ---------- навигация под шапкой ---------- */
.eplx-nav { position: relative; z-index: 50; padding: 24px 0 20px; }
.eplx-nav__list { display: flex; justify-content: center; gap: 68px; }
.eplx-nav__link { font: 400 var(--eplx-body-s) var(--eplx-font); transition: opacity .2s; }
.eplx-nav__link:hover, .eplx-nav__link.is-active { opacity: .6; }
/* на главной навигация лежит поверх hero */
.eplx-page-main .eplx-nav { position: absolute; left: 0; right: 0; top: var(--eplx-header-h); }

/* ---------- выпадающий каталог ---------- */
.eplx-catalog-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    border-radius: 0 0 var(--eplx-radius) var(--eplx-radius);
    background: var(--eplx-card);
}
.eplx-catalog-menu.is-open { display: block; }
.eplx-catalog-menu__inner { display: flex; justify-content: center; gap: 20px; padding: 40px 51px; }
.eplx-catalog-menu__grid { display: grid; grid-template-columns: repeat(3, 280px); gap: 20px; }
.eplx-catalog-menu__item { display: flex; flex-direction: column; gap: 12px; }
.eplx-catalog-menu__img {
    width: 280px;
    height: 280px;
    border-radius: var(--eplx-radius);
    overflow: hidden;
    background: var(--eplx-card-dark);
}
.eplx-catalog-menu__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.eplx-catalog-menu__item:hover img { transform: scale(1.04); }
.eplx-catalog-menu__promo { width: 280px; display: flex; flex-direction: column; gap: 12px; }
.eplx-catalog-menu__promo-card {
    position: relative;
    flex: 1;
    overflow: hidden;
    padding: 40px 36px;
    border-radius: var(--eplx-radius);
    background: #000;
}
.eplx-catalog-menu__promo-title { font: 600 var(--eplx-h5) var(--eplx-font); }
.eplx-catalog-menu__promo-text { margin-top: 12px; font: 400 var(--eplx-body-s) var(--eplx-font); }
.eplx-catalog-menu__steps { position: relative; z-index: 1; margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.eplx-catalog-menu__step b { display: block; font: 600 var(--eplx-body-s) var(--eplx-font); }
.eplx-catalog-menu__step span { display: block; margin-top: 4px; opacity: .8; font: 400 var(--eplx-body-xs) var(--eplx-font); }
.eplx-catalog-menu__promo-img { position: absolute; right: -90px; bottom: -123px; width: 275px; max-width: none; }

/* ---------- подсказки поиска ---------- */
.eplx-search-drop {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 110;
    display: none;
    max-height: 70vh;
    overflow: auto;
    padding: 20px 24px;
    border-radius: var(--eplx-radius);
    background: var(--eplx-card);
}
.eplx-search-drop.is-open { display: block; }
.eplx-search-drop__title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font: 600 var(--eplx-body-m) var(--eplx-font); }
.eplx-search-drop__clear { opacity: .4; font: 600 var(--eplx-body-xs) var(--eplx-font); }
.eplx-search-drop__list { display: flex; flex-direction: column; gap: 4px; }
.eplx-search-drop__list + .eplx-search-drop__title { margin-top: 24px; }
.eplx-search-drop__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--eplx-radius-s);
    background: rgba(254, 254, 252, .03);
    font: 400 var(--eplx-body-xs) var(--eplx-font);
}
.eplx-search-drop__row:hover { background: rgba(254, 254, 252, .07); }
.eplx-search-drop__row .eplx-icon { opacity: .4; }
.eplx-search-drop__empty { opacity: .6; font: 400 var(--eplx-body-xs) var(--eplx-font); }
.eplx-search-drop__empty a { text-decoration: underline; }
.eplx-search-drop__all { margin-top: 16px; }
.eplx-search-drop__list + .eplx-search-drop__title,
.eplx-search-drop__products + .eplx-search-drop__title { margin-top: 24px; }
.eplx-search-drop__products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.eplx-search-drop__product { display: flex; flex-direction: column; gap: 6px; font: 400 var(--eplx-body-xs) var(--eplx-font); }
.eplx-search-drop__product-img {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--eplx-radius-s);
    background: var(--eplx-card-dark);
    overflow: hidden;
}
.eplx-search-drop__product-img img { max-width: 80%; max-height: 80%; object-fit: contain; }
.eplx-search-drop__product-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eplx-search-drop__product-price { font-weight: 600; }
.eplx-search-drop__product-price s { font-weight: 400; opacity: .4; }
@media (max-width: 767px) {
    .eplx-search-drop__products { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- реквизиты ---------- */
.eplx-popup__dialog.eplx-requisites { max-width: 880px; padding: 40px 48px; }
.eplx-requisites .eplx-popup__title { text-align: left; }
.eplx-requisites__text { font: 400 var(--eplx-body-s) var(--eplx-font); }
@media (max-width: 767px) {
    .eplx-popup__dialog.eplx-requisites { padding: 40px 16px 24px; }
    .eplx-requisites__text { font: 400 var(--eplx-body-xs) var(--eplx-font); }
}

/* ---------- выбор города ---------- */
.eplx-city__cols { margin-top: 24px; columns: 3; column-gap: 54px; }
.eplx-city__item { display: block; margin-bottom: 20px; font: 400 var(--eplx-body-s) var(--eplx-font); break-inside: avoid; }
.eplx-city__item.is-current { font-weight: 600; }
.eplx-city__item:hover { opacity: .6; }
.eplx-city__empty { margin-top: 24px; opacity: .6; }

/* ================= шапка mobile ================= */
.eplx-mheader { display: none; }

@media (max-width: 1023px) {
    .eplx-header__inner, .eplx-nav, .eplx-catalog-menu { display: none !important; }
    .eplx-mheader {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: var(--eplx-header-h);
        padding: 0 16px;
    }
    .eplx-mheader__group { display: flex; gap: 12px; width: 96px; }
    .eplx-mheader__group--right { justify-content: flex-end; }
    .eplx-mheader__logo img { width: 53px; height: 20px; }
    .eplx-page-main .eplx-nav { position: static; }
}

/* ---------- мобильное меню ---------- */
.eplx-mmenu {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    flex-direction: column;
    overflow: auto;
    background: #000;
}
.eplx-mmenu.is-open { display: flex; }
.eplx-mmenu__head { border-bottom: 1px solid var(--eplx-line-3); }
.eplx-mmenu__city { display: flex; justify-content: space-between; gap: 8px; padding: 20px 16px 0; }
.eplx-mmenu__city-current { display: flex; align-items: center; gap: 8px; }
.eplx-mmenu__city-current b { color: var(--eplx-gray-2); }
.eplx-mmenu__city-current .eplx-icon { opacity: .5; }
.eplx-mmenu__body { display: flex; flex-direction: column; gap: 12px; padding: 20px 16px; }
.eplx-mmenu__title { margin-bottom: 8px; font: 600 var(--eplx-body-s) var(--eplx-font); }
.eplx-mmenu__cats { display: flex; flex-direction: column; gap: 4px; }
.eplx-mmenu__cat {
    display: block;
    padding: 8px 16px;
    border-radius: var(--eplx-radius-s);
    background: rgba(254, 254, 252, .03);
    font: 400 var(--eplx-body-xs) var(--eplx-font);
}
.eplx-mmenu__links { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.eplx-mmenu__link { display: flex; justify-content: space-between; align-items: center; font: 600 var(--eplx-body-s) var(--eplx-font); }
.eplx-mmenu__link .eplx-icon { width: 12px; height: 12px; opacity: .4; }
.eplx-mmenu__social { margin-top: auto; display: flex; justify-content: center; gap: 12px; padding: 20px 0; border-top: 1px solid var(--eplx-line-3); }

/* ---------- мобильный поиск ---------- */
.eplx-msearch {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: none;
    flex-direction: column;
    gap: 20px;
    overflow: auto;
    padding: 20px 16px;
    background: #000;
}
.eplx-msearch.is-open { display: flex; }
.eplx-msearch__form { display: flex; flex-direction: column; gap: 20px; }
.eplx-msearch__bar { display: flex; align-items: center; gap: 16px; }
.eplx-msearch__bar .eplx-field { flex: 1; }
.eplx-msearch__cancel { opacity: .4; font: 600 var(--eplx-body-xs) var(--eplx-font); }
.eplx-msearch .eplx-search-drop { position: static; display: block; max-height: none; padding: 0; background: none; }
.eplx-msearch .eplx-search-drop__title { font: 600 var(--eplx-body-s) var(--eplx-font); }

/* ---------- соцсети ---------- */
.eplx-social { display: flex; gap: 4px; }
.eplx-social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--eplx-radius-s);
    background: #252525;
    transition: background-color .2s;
}
.eplx-social__link:hover { background: #333; }

/* ================= подвал ================= */
.eplx-footer { margin-top: var(--eplx-section-gap); border-top: 1px solid var(--eplx-line-3); }
.eplx-footer__inner { display: flex; gap: 140px; padding-top: 60px; padding-bottom: 60px; }
.eplx-footer__logo { flex: none; }
.eplx-footer__logo img { width: 117px; height: 44px; }
.eplx-footer__main { display: flex; gap: 140px; flex: 1; }
.eplx-footer__left { display: flex; flex-direction: column; gap: 48px; }
.eplx-footer__cols { display: flex; gap: 80px; }
.eplx-footer__col-title { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 8px; font: 600 var(--eplx-body-s) var(--eplx-font); text-align: left; }
.eplx-footer__col-title .eplx-icon { display: none; }
.eplx-footer__col ul { display: flex; flex-direction: column; gap: 8px; }
.eplx-footer__col a { font: 400 var(--eplx-body-xs) var(--eplx-font); transition: opacity .2s; }
.eplx-footer__col a:hover { opacity: .6; }
.eplx-footer__contacts { display: flex; flex-direction: column; gap: 20px; }
.eplx-footer__phone { margin-top: 12px; }
.eplx-footer__phone a { display: block; font: 600 var(--eplx-body-s) var(--eplx-font); }
.eplx-footer__phone span, .eplx-footer__legal a { display: block; opacity: .4; font: 400 var(--eplx-caption) var(--eplx-font); }
.eplx-footer__legal { display: flex; flex-direction: column; gap: 4px; }
.eplx-footer__legal a:hover { opacity: .8; }
.eplx-footer__copy { font: 400 var(--eplx-caption) var(--eplx-font); }
.eplx-footer__right { width: 303px; display: flex; flex-direction: column; gap: 40px; padding-top: 11px; }
.eplx-footer__form-title { margin-bottom: 8px; font: 600 var(--eplx-body-s) var(--eplx-font); }
.eplx-footer__form { display: flex; flex-direction: column; gap: 16px; }
.eplx-footer__fields { display: flex; flex-direction: column; gap: 8px; }
.eplx-footer__checks { display: flex; flex-direction: column; gap: 4px; }
.eplx-footer__lang { display: flex; flex-direction: column; gap: 4px; }
.eplx-footer__msg { font: 400 var(--eplx-body-xs) var(--eplx-font); }
.eplx-footer__msg.is-error { color: var(--eplx-red); }

@media (max-width: 1279px) {
    .eplx-footer__inner, .eplx-footer__main { gap: 60px; }
    .eplx-footer__cols { gap: 40px; }
}

@media (max-width: 1023px) {
    .eplx-footer__inner { flex-direction: column-reverse; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
    .eplx-footer__main { flex-direction: column-reverse; gap: 40px; }
    .eplx-footer__right { width: 100%; padding-top: 0; }
    .eplx-footer__logo { display: none; }
    .eplx-footer__left { gap: 20px; }
    .eplx-footer__left::before {
        content: '';
        width: 79px;
        height: 30px;
        background: url('../images/logo.svg') no-repeat 0 0 / contain;
    }
    .eplx-footer__cols { flex-direction: column; gap: 12px; }
    .eplx-footer__col-title { margin-bottom: 0; }
    .eplx-footer__col-title .eplx-icon { display: block; width: 12px; height: 12px; opacity: .4; transition: transform .2s; }
    .eplx-footer__col ul { display: none; margin-top: 8px; }
    .eplx-footer__col.is-open ul { display: flex; }
    .eplx-footer__col.is-open .eplx-icon { transform: rotate(180deg); }
}

/* ---------- мини-корзина после добавления (js/app.js, Figma «тултипы по клику на добавление PC») ---------- */
.eplx-minicart {
    position: absolute;
    top: calc(100% + 16px);
    right: -16px;
    z-index: 950;
    display: none;
    flex-direction: column;
    gap: 12px;
    width: 340px;
    padding: 20px;
    border-radius: var(--eplx-radius);
    background: var(--eplx-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .6);
}
.eplx-minicart.is-open { display: flex; }
.eplx-minicart::before { content: ''; position: absolute; top: -6px; right: 22px; width: 12px; height: 12px; background: var(--eplx-card); transform: rotate(45deg); }
.eplx-minicart__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--eplx-line); font: 600 var(--eplx-body-m) var(--eplx-font); }
.eplx-minicart__head button { display: inline-flex; opacity: .6; }
.eplx-minicart__head button:hover { opacity: 1; }
.eplx-minicart__items { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.eplx-minicart__item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--eplx-line); }
.eplx-minicart__photo { display: block; aspect-ratio: 1; border-radius: var(--eplx-radius-s); background: #000; overflow: hidden; }
.eplx-minicart__photo img { width: 100%; height: 100%; object-fit: contain; }
.eplx-minicart__info { display: flex; flex-direction: column; gap: 4px; font: 400 var(--eplx-body-xs) var(--eplx-font); }
.eplx-minicart__info b { font: 600 var(--eplx-body-s) var(--eplx-font); }
.eplx-minicart__info s { color: var(--eplx-gray-2); font: 400 var(--eplx-caption) var(--eplx-font); }
.eplx-minicart__rows { font: 400 var(--eplx-body-xs) var(--eplx-font); }
.eplx-minicart__rows .eplx-code-res__row:last-child span { font-weight: 600; }
.eplx-minicart__empty { color: var(--eplx-gray); }

