/* =========================================================
   Layout: top-panel, header, catalog flyout, burger, footer,
   modals, toasts
   ========================================================= */

.site { display: flex; flex-direction: column; min-height: 100vh; }
.content { flex: 1 0 auto; padding-bottom: 48px; }

/* ---------- Верхня панель ---------- */
.top-panel {
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    font-size: 13px;
}
.top-panel__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 38px;
}
.top-panel__lang { display: flex; align-items: center; gap: 16px; }
.top-panel__lang .dropdown__toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 38px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 13px;
    color: var(--c-text);
    cursor: pointer;
}
.top-panel__lang .dropdown__code { color: var(--c-text-muted); }
.top-panel__lang .dropdown__arrow { width: 14px; height: 14px; color: var(--c-text-muted); }

.quick-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    overflow: hidden;
}
.quick-links__item a { color: var(--c-text); white-space: nowrap; }
.quick-links__item a:hover { color: var(--c-primary); }

/* ---------- Шапка ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
}
.header__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    height: var(--header-h);
}
.header__burger {
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-white);
    cursor: pointer;
    flex: none;
}
.header__burger svg { width: 24px; height: 24px; }

.header__logo { flex: none; display: flex; align-items: center; }
.logo { display: inline-flex; align-items: baseline; color: var(--c-text); font-weight: 800; font-size: 26px; letter-spacing: -.5px; }
.logo:hover { color: var(--c-text); }
.logo img { display: block; }
.logo img.logo__mobile { display: none; }
.logo__fallback span { color: var(--c-primary); font-size: .55em; vertical-align: super; }
.logo--small { font-size: 20px; }

.btn-catalog {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--radius);
    background: var(--c-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: .15s;
}
.btn-catalog:hover { background: var(--c-primary-hover); }
.btn-catalog svg { width: 20px; height: 20px; }

.header__search { flex: 1 1 auto; min-width: 120px; position: relative; }
.search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 90;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
    overflow: hidden;
}
.search-suggest.hidden { display: none; }
.search-suggest__item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--c-text); }
.search-suggest__item:hover, .search-suggest__item.is-active { background: var(--c-bg-2); }
.search-suggest__item img { width: 40px; height: 40px; object-fit: contain; flex: none; border-radius: 6px; background: var(--c-bg-2); }
.search-suggest__name { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest__price { font-size: 13px; font-weight: 700; color: var(--c-sale); white-space: nowrap; }
.search-suggest__all { display: block; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--c-primary); border-top: 1px solid var(--c-border); text-align: center; }
.search-suggest__all:hover { text-decoration: underline; }
.search-form {
    display: flex;
    align-items: center;
    height: 44px;
    border: 2px solid var(--c-primary);
    border-radius: var(--c-radius);
    background: var(--c-white);
    overflow: hidden;
    max-width: 720px;
}
.search-form__input {
    flex: 1;
    height: 100%;
    min-width: 0;
    padding: 0 18px;
    border: 0;
    outline: none;
    font: inherit;
    font-size: 15px;
    background: none;
}
.search-form__input::placeholder { color: #757575; }
/* режим імітації набору: сірий текст, плейсхолдер не видно */
.search-form__input--demo { color: #757575; }
.search-form__input--demo::placeholder { color: transparent; }
.search-form__btn {
    width: 52px;
    height: 100%;
    border: 0;
    background: none;
    color: var(--c-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.search-form__btn svg { width: 22px; height: 22px; }

.phone-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 6px;
    border: 0;
    background: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text);
    cursor: pointer;
}
.phone-toggle:hover { color: var(--c-primary); }
.header__phone { display: flex; align-items: center; padding: 0 4px; }
.phone-toggle__icon { width: 20px; height: 20px; color: var(--c-text); }
.header__phone .dropdown__arrow { width: 16px; height: 16px; color: var(--c-text-muted); }

.contact-pop { padding: 14px; min-width: 300px; }
.dropdown__menu-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    background: var(--c-white);
    color: var(--c-text-light);
    cursor: pointer;
}
.dropdown__menu-close:hover { color: var(--c-primary); border-color: var(--c-primary); }
.dropdown__menu-close svg { width: 14px; height: 14px; }
.contact-pop__phone { display: block; font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--c-text); }
.contact-pop__phone:hover { color: var(--c-primary); }
.contact-pop__row { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--c-border); font-size: 14px; }
.contact-pop__row b { flex: 0 0 110px; }
.contact-pop__row a { color: var(--c-text); }
.contact-pop__row a:hover { color: var(--c-primary); }

.header__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.action-link {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 62px;
    height: 52px;
    padding: 0 8px;
    border: 0;
    background: none;
    color: var(--c-text);
    font-size: 12px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: .15s;
}
.action-link:hover { color: var(--c-primary); background: var(--c-bg-2); }
.action-link svg { width: 24px; height: 24px; }
.action-link__count {
    position: absolute;
    top: 2px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--c-sale);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.action-link__count.is-empty { display: none; }
.cart-ico { position: relative; display: inline-flex; }
.cart-ico__count {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--c-sale);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.cart-ico__count.is-empty { display: none; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown__toggle { cursor: pointer; }
.dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 70;
    min-width: 200px;
    padding: 8px;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}
.dropdown__menu--up { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; }
.dropdown__menu--left { left: 0; right: auto; }
.dropdown__menu--wide { min-width: 340px; }
.dropdown__menu--cart { min-width: 360px; padding: 14px; }
.dropdown__title { padding: 6px 8px 10px; font-weight: 700; font-size: 14px; }
.dropdown__item {
    display: block;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    font: inherit;
    font-size: 14px;
    color: var(--c-text);
    text-align: left;
    cursor: pointer;
}
.dropdown__item:hover { background: var(--c-bg-2); color: var(--c-primary); }
.dropdown__item.is-active { background: var(--c-bg-2); color: var(--c-primary); font-weight: 600; }
.dropdown__item ins { color: var(--c-text-muted); text-decoration: none; }
.dropdown__list { list-style: none; }
.dropdown__list a { display: block; padding: 9px 10px; border-radius: 6px; color: var(--c-text); font-size: 14px; }
.dropdown__list a:hover { background: var(--c-bg-2); color: var(--c-primary); }
.dropdown__list--icons a { display: flex; align-items: center; gap: 10px; }
.dropdown__list--icons svg { width: 18px; height: 18px; flex: none; color: var(--c-text-muted); }
.dropdown__list--icons a:hover svg { color: var(--c-primary); }
/* ---------- Міні-кошик ---------- */
.minicart__list { list-style: none; max-height: 340px; overflow-y: auto; margin: 0 -4px; }
.minicart__item { display: flex; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--c-border); }
.minicart__img { flex: none; width: 50px; }
.minicart__desc { flex: 1; min-width: 0; }
.minicart__name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.minicart__name:hover { color: var(--c-primary); }
.minicart__tools { display: flex; align-items: center; gap: 8px; }
.minicart__qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--c-border-2);
    border-radius: 6px;
    overflow: hidden;
}
.minicart__qty button {
    width: 26px;
    height: 28px;
    border: 0;
    background: var(--c-bg-2);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}
.minicart__qty input {
    width: 34px;
    height: 28px;
    border: 0;
    border-left: 1px solid var(--c-border);
    border-right: 1px solid var(--c-border);
    text-align: center;
    font: inherit;
    font-size: 13px;
    outline: none;
    -moz-appearance: textfield;
}
.minicart__qty input::-webkit-outer-spin-button,
.minicart__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.minicart__sum { font-weight: 700; font-size: 14px; margin-left: auto; }
.minicart__price-old {
    display: inline;
    margin-left: 5px;
    font-size: 12px;
    font-weight: 400;
    color: var(--c-text-muted) !important;
    text-decoration: line-through;
}
.minicart__price-new { color: var(--c-danger) !important; }
.minicart__del { border: 0; background: none; color: var(--c-text-muted); cursor: pointer; padding: 2px; }
.minicart__del:hover { color: var(--c-sale); }
.minicart__del svg { width: 16px; height: 16px; }
.minicart__total { display: flex; justify-content: space-between; padding: 12px 0; font-size: 16px; }
.minicart__total b { font-size: 18px; }
.minicart__buttons { display: flex; gap: 8px; }
.minicart__buttons .btn { flex: 1; }
.minicart__empty { padding: 18px 0; text-align: center; color: var(--c-text-light); }

/* ---------- Каталог flyout ---------- */
.catalog-flyout { position: absolute; top: 100%; left: 0; right: 0; z-index: 95; }
.catalog-flyout__backdrop { position: fixed; inset: 0; z-index: 0; background: rgba(0, 0, 0, .45); }
.catalog-flyout__panel {
    position: relative;
    z-index: 1;
    width: calc(100% - 48px);
    max-width: var(--container);
    margin: 0 auto;
    background: var(--c-white);
    border-radius: 12px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .2);
    max-height: calc(100vh - var(--header-h));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: catalogDrop .16s ease;
}
@keyframes catalogDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.catalog-flyout__head--mobile { display: none; }
.catalog-flyout__cols {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 300px;
    height: min(560px, calc(100vh - var(--header-h)));
    overflow: hidden;
}
.catalog-flyout__cols.is-no-promo { grid-template-columns: 320px minmax(0, 1fr); }
.catalog-menu { list-style: none; padding: 4px 0; overflow-y: auto; border-right: 1px solid var(--c-border); min-height: 0; }
.catalog-menu__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 16px;
    color: var(--c-text);
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}
.catalog-menu__link:hover, .catalog-menu__item.is-active > .catalog-menu__link { background: var(--c-bg-2); color: var(--c-primary); }
.catalog-menu__icon { width: 26px; height: 26px; object-fit: contain; flex: none; }
.catalog-menu__icon--ph { display: block; background: var(--c-bg-3); border-radius: 8px; }
.catalog-menu__name { flex: 1; min-width: 0; }
.catalog-menu__arrow { width: 16px; height: 16px; color: var(--c-text-muted); }
.catalog-menu__item.is-active .catalog-menu__arrow { color: var(--c-primary); }

.catalog-flyout__detail { padding: 22px 26px; overflow-y: auto; min-height: 0; }
.catalog-flyout__hint {
    color: var(--c-text-light);
    font-size: 14px;
    padding: 18px;
    background: var(--c-bg-2);
    border-radius: var(--radius, 8px);
}
.catalog-flyout__detail .catalog-sub { padding: 0; background: none; }
.catalog-sub__inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 28px; }
.catalog-sub__col { min-width: 0; }
.catalog-sub__row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.catalog-sub__row .catalog-sub__head { flex: 1; min-width: 0; margin-bottom: 0; }
.catalog-sub__head { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--c-text); }
.catalog-sub__head:hover { color: var(--c-primary); }
.catalog-sub__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    background: var(--c-white);
    color: var(--c-text-light);
    cursor: pointer;
}
.catalog-sub__toggle svg { width: 16px; height: 16px; transition: transform .15s; }
.catalog-sub__col.is-open .catalog-sub__toggle svg { transform: rotate(180deg); }
.catalog-sub__list { list-style: none; line-height: 1.35; }
.catalog-sub__list li { margin: 2px 0; }
.catalog-sub__list a { color: var(--c-text); font-size: 14px; line-height: inherit; }
.catalog-flyout__back { display: none; align-items: center; justify-content: center; }
.catalog-flyout__title { flex: 1; min-width: 0; }
.catalog-sub__list a:hover { color: var(--c-primary); }

.catalog-flyout__promo { padding: 16px; border-left: 1px solid var(--c-border); overflow-y: auto; min-height: 0; }
.catalog-promo {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 100%;
    margin: 0 auto;
    padding: 18px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: var(--c-bg-3);
    color: #fff;
    overflow: hidden;
}
.catalog-promo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 24, 60, .05), rgba(8, 24, 60, .8));
}
.catalog-promo--plain::before { display: none; }
.catalog-promo__badge,
.catalog-promo__title,
.catalog-promo__cta { position: relative; }
.catalog-promo__badge {
    align-self: flex-start;
    padding: 4px 10px;
    background: var(--c-sale, #dd4b39);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}
.catalog-promo__title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.catalog-promo__cta { font-size: 13px; font-weight: 700; text-decoration: underline; opacity: .9; }
.catalog-promo:hover .catalog-promo__cta { opacity: 1; }

@media (max-width: 1024px) {
    .catalog-flyout { position: fixed; inset: 0; z-index: 130; }
    .catalog-flyout__backdrop { display: none; }
    .catalog-flyout__panel {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }
    .catalog-flyout__head--mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 14px 16px;
        background: var(--c-bg-2);
        border-bottom: 1px solid var(--c-border);
        font-size: 18px;
        font-weight: 700;
        flex: none;
    }
    /* збільшений шрифт і тап-таргети під мобільні екрани */
    .catalog-menu__link { font-size: 16px; padding: 10px 16px; gap: 12px; }
    .catalog-menu__icon { width: 28px; height: 28px; }
    .catalog-sub__head { font-size: 16px; }
    .catalog-sub__list a { font-size: 15px; }
    .catalog-sub__list li { margin: 4px 0; }
    .catalog-sub__toggle { width: 40px; height: 40px; }
    .catalog-flyout__cols { display: block; height: auto; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
    .catalog-menu { border-right: 0; overflow: visible; padding: 8px 0; }
    .catalog-flyout__promo { display: none; }
    /* перегляд підкатегорій: список головних ховається, показується вміст у detail */
    .catalog-flyout:not(.is-mobile-sub) .catalog-flyout__detail { display: none; }
    .catalog-flyout.is-mobile-sub .catalog-menu { display: none; }
    .catalog-flyout.is-mobile-sub .catalog-flyout__detail { display: block; padding: 14px 16px; overflow: visible; }
    .catalog-flyout.is-mobile-sub .catalog-flyout__back { display: inline-flex; }
    .catalog-flyout.is-mobile-sub .catalog-sub__list { display: none; }
    .catalog-flyout.is-mobile-sub .catalog-sub__col.is-open .catalog-sub__list { display: block; }
    .catalog-flyout.is-mobile-sub .catalog-sub__toggle { display: inline-flex; }
    .catalog-flyout.is-mobile-sub .catalog-sub__row { margin-bottom: 0; padding: 8px 0; border-bottom: 1px solid var(--c-border); }
    .catalog-flyout.is-mobile-sub .catalog-sub__col { margin-top: 14px; }
    .catalog-sub { padding: 6px 16px 16px 56px; background: var(--c-bg-2); }
    .catalog-sub__inner { display: block; }
    .catalog-sub__col { margin-top: 12px; }
}

/* ---------- Баннер над шапкой ---------- */
.top-banner { display: flex; align-items: center; justify-content: center; overflow: hidden; line-height: 0; }
.top-banner__link { display: flex; align-items: center; justify-content: center; width: 100%; }
.top-banner picture { display: block; }
.top-banner img { display: block; width: auto; max-width: 100%; height: auto; }

/* ---------- Бургер-панель ---------- */
.side-backdrop { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, .45); }
.side-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 96;
    width: 340px;
    max-width: 88vw;
    height: 100%;
    background: var(--c-white);
    box-shadow: 6px 0 30px rgba(0, 0, 0, .2);
    transform: translateX(-105%);
    transition: transform .22s ease;
    overflow-y: auto;
    padding: 16px 18px 30px;
}
.side-panel.is-open { transform: none; }

/* ---------- Дравер «Товар додано в кошик» ---------- */
.cart-drawer-backdrop { position: fixed; inset: 0; z-index: 118; background: rgba(0, 0, 0, .45); }
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 119;
    width: 400px;
    max-width: 92vw;
    height: 100%;
    background: var(--c-white);
    box-shadow: -6px 0 30px rgba(0, 0, 0, .2);
    transform: translateX(105%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}
.cart-drawer.is-open { transform: none; }
.cart-drawer__head {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--c-border);
}
.cart-drawer__title { font-size: 17px; font-weight: 700; }
.cart-drawer__body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; }
.cart-drawer__foot {
    flex: none;
    display: flex;
    gap: 10px;
    padding: 14px 18px 18px;
    border-top: 1px solid var(--c-border);
}
.cart-drawer__foot .btn { flex: 1; min-height: 44px; }
.cart-drawer__item { display: flex; gap: 12px; align-items: flex-start; }
.cart-drawer__item + .cart-drawer__item { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--c-border); }
.cart-drawer__img { flex: none; width: 84px; }
.cart-drawer__img img { width: 84px; height: 84px; object-fit: contain; border-radius: var(--radius); }
.cart-drawer__info { flex: 1; min-width: 0; }
.cart-drawer__name { display: block; font-size: 14px; font-weight: 600; color: var(--c-text); margin-bottom: 6px; }
.cart-drawer__price { font-size: 16px; font-weight: 700; color: var(--c-sale); margin-bottom: 10px; }
.cart-drawer__price-old {
    display: inline;
    margin-left: 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--c-text-muted) !important;
    text-decoration: line-through;
}
.cart-drawer__price-new { color: var(--c-sale) !important; }
.cart-drawer__sum { flex: none; font-size: 15px; font-weight: 700; white-space: nowrap; }
.cart-drawer__bundle {
    margin: 18px 0;
    border: 2px solid #d2e9df;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fdfffe;
}
.cart-drawer__bundle-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cart-drawer__bundle-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--c-green); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-drawer__bundle-del { flex: none; border: 0; background: none; padding: 2px; cursor: pointer; color: var(--c-text-muted); display: inline-flex; }
.cart-drawer__bundle-del:hover { color: var(--c-sale); }
.cart-drawer__bundle-del svg { width: 18px; height: 18px; }
.cart-drawer__bundle-list { list-style: none; margin: 0; padding: 0; }
.cart-drawer__bundle-item { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.cart-drawer__bundle-item + .cart-drawer__bundle-item { border-top: 1px solid var(--c-border); }
.cart-drawer__bundle-item img { flex: none; width: 40px; height: 40px; object-fit: contain; border-radius: 6px; }
.cart-drawer__bundle-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-drawer__bundle-qty { color: var(--c-text-muted); white-space: nowrap; }
.cart-drawer__bundle-sum { font-weight: 700; white-space: nowrap; }
.cart-drawer__reco { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--c-border); }
.cart-drawer__reco-title { font-size: 15px; font-weight: 700; color: var(--c-text); margin-bottom: 10px; }
.cart-drawer__reco-track { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.cart-drawer__reco-card { flex: 0 0 130px; width: 130px; display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; }
.cart-drawer__reco-img { display: block; background: #fff; border-radius: 8px; overflow: hidden; }
.cart-drawer__reco-img img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border-radius: 8px; }
.cart-drawer__reco-name { font-size: 12px; line-height: 1.3; color: var(--c-text); height: 32px; overflow: hidden; }
.cart-drawer__reco-price { font-size: 13px; font-weight: 700; color: var(--c-text); }
.cart-drawer__reco-price s { color: var(--c-text-muted); font-weight: 400; margin-left: 4px; }
.cart-drawer__reco-add { border: 0; border-radius: 8px; background: var(--c-primary); color: #fff; font-size: 13px; font-weight: 700; padding: 8px 10px; cursor: pointer; transition: .15s; }
.cart-drawer__reco-add:hover { background: var(--c-primary-hover); }
@media (max-width: 768px) {
    .cart-drawer {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        max-height: 88vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(105%);
    }
    .cart-drawer__foot { flex-direction: column; }
}
.side-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.side-panel__account {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: var(--c-bg-2);
    border-radius: var(--radius);
    margin-bottom: 14px;
}
.side-panel__account--link { color: var(--c-text); }
.side-panel__account--link:hover { color: var(--c-text); background: #ededed; }
.side-panel__avatar {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 50%;
    border: 2px solid var(--c-primary);
    background: transparent;
    color: var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.side-panel__avatar svg { width: 22px; height: 22px; }
.side-account__info { display: flex; flex-direction: column; min-width: 0; }
.side-account__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.side-account__email { font-size: 12px; color: var(--c-text-muted); word-break: break-all; }
.side-account__guest { min-width: 0; }
.side-account__guest p { margin: 0; font-size: 13px; }
.side-account__guest > span { display: block; color: var(--c-text-muted); font-size: 12px; margin-top: 3px; }
.side-panel__lang {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 0;
}
.side-panel__lang-label { font-size: 14px; color: var(--c-text-light); }
.side-panel__lang-options { display: flex; gap: 6px; }
.side-panel__lang-options a {
    min-width: 40px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--c-border-2);
    border-radius: 15px;
    background: var(--c-white);
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
}
.side-panel__lang-options a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.side-panel__lang-options a.is-active {
    background: transparent;
    border-color: var(--c-primary);
    color: var(--c-primary);
}

/* ---------- Мобільне меню ---------- */
.side-nav { margin-top: 4px; }
.side-menu { list-style: none; margin: 0; padding: 0; }
.side-menu__item { border-bottom: 1px solid var(--c-border); }
.side-menu__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.2;
}
.side-menu__link:hover { color: var(--c-primary); }
.side-menu__ico {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: none;
}
.side-menu__ico svg { width: 22px; height: 22px; }
.side-menu__count {
    position: absolute;
    top: -7px;
    right: -10px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--c-sale);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}
.side-menu__count.is-empty { display: none; }

.side-panel__block { border-bottom: 1px solid var(--c-border); }
.side-panel__block-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 0;
    border: 0;
    background: none;
    color: var(--c-text);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.side-panel__block-head:hover { color: var(--c-primary); }
.side-panel__block-ico { width: 22px; height: 22px; flex: none; }
.side-panel__block-arrow { width: 18px; height: 18px; margin-left: auto; color: var(--c-text-muted); transition: transform .2s; }
.side-panel__city .dropdown__menu {
    position: static;
    top: auto;
    right: auto;
    min-width: 0;
    margin-top: 2px;
    padding: 0 0 8px 32px;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.side-panel__city .dropdown__item { padding: 7px 0; font-size: 14px; color: var(--c-text-light); }
.side-panel__city .dropdown__item:hover { background: none; color: var(--c-primary); }
.side-panel__city .dropdown__item.is-active { background: none; color: var(--c-primary); font-weight: 600; }

.side-acc { border-bottom: 1px solid var(--c-border); }
.side-acc__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    list-style: none;
    color: var(--c-text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.side-acc__head::-webkit-details-marker { display: none; }
.side-acc__head::marker { content: ''; }
.side-acc__head:hover { color: var(--c-primary); }
.side-acc__ico { width: 22px; height: 22px; flex: none; }
.side-acc__arrow { width: 18px; height: 18px; margin-left: auto; color: var(--c-text-muted); transition: transform .2s; }
.side-acc[open] .side-acc__arrow { transform: rotate(180deg); }
.side-acc__list { list-style: none; margin: 0; padding: 0 0 8px 32px; }
.side-acc__list a { display: block; padding: 7px 0; color: var(--c-text-light); font-size: 14px; }
.side-acc__list a:hover { color: var(--c-primary); }

.side-panel__block-title { padding: 12px 0; font-size: 15px; font-weight: 600; color: var(--c-text); }
.side-panel__socials { padding: 0 0 14px; }

.side-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 0;
    border: 0;
    background: none;
    color: var(--c-text);
    font: inherit;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}
.side-logout:hover { color: var(--c-sale); }
.side-logout .side-menu__ico svg { width: 22px; height: 22px; }

/* ---------- Мини-header и футер checkout ---------- */
.chk-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}
.chk-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.chk-phone { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--c-text); white-space: nowrap; }
.chk-phone:hover { color: var(--c-primary); }
.chk-phone__icon { width: 20px; height: 20px; color: var(--c-primary); }
.chk-footer { background: var(--c-bg-2); border-top: 1px solid var(--c-border); margin-top: 34px; }
.chk-footer__inner { padding: 18px 0 20px; font-size: 13px; color: var(--c-text-muted); }
/* Нижня частина футера на сторінці оформлення замовлення: компактно, без_divider */
.chk-footer .footer__bottom { margin-top: 8px; padding: 12px 0 20px; border-top: 0; }

/* ---------- Футер ---------- */
.footer { background: var(--c-bg-2); border-top: 1px solid var(--c-border); padding: 34px 0 26px; font-size: 14px; }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer__head { display: none; font-weight: 700; font-size: 15px; }
.footer__list { list-style: none; }
.footer__list li { margin-bottom: 9px; }
.footer__list a { color: var(--c-text-light); }
.footer__list a:hover { color: var(--c-primary); }
.footer__list .footer__hours { color: var(--c-text-light); }
.footer__contacts .footer__phone a { font-size: 17px; font-weight: 600; color: var(--c-text); }
.footer__m-icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--c-border);
}
.footer__copy { margin: 0; color: var(--c-text-muted); font-size: 13px; }

.payment-icons { display: flex; align-items: center; gap: 8px; }
.payment-icons__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--c-border-2);
    border-radius: 4px;
    background: var(--c-white);
    font-size: 11px;
    font-weight: 800;
    font-style: normal;
    color: #1a1f71;
    letter-spacing: .02em;
}
.payment-icons__item--mc { color: #eb001b; gap: 0; }
.payment-icons__item--mc i { width: 14px; height: 14px; border-radius: 50%; background: #eb001b; display: block; }
.payment-icons__item--mc i + i { background: #f79e1b; margin-left: -6px; mix-blend-mode: multiply; }
.payment-icons__item--pp { color: #003087; }
.payment-icons__item--mc2 { color: #f47b20; }
.payment-icons--sm .payment-icons__item { min-width: 40px; height: 24px; font-size: 10px; }

/* ---------- Модалки ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.modal__dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--c-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .3);
    animation: modalIn .18s ease;
}
@keyframes modalIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--c-bg-2);
    color: var(--c-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal__close:hover { background: var(--c-bg-3); color: var(--c-sale); }
.modal__close svg { width: 18px; height: 18px; }
.modal__title { font-size: 24px; font-weight: 700; margin-bottom: 18px; }

.login-form__buttons { margin-top: 8px; }
.login-form__links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 14px; }

/* ---------- Тости ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 130; display: flex; flex-direction: column; gap: 10px; }
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 360px;
    padding: 13px 16px;
    background: #262626;
    color: #fff;
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
    font-size: 14px;
    animation: toastIn .2s ease;
}
.toast--success { background: var(--c-green); }
.toast svg { width: 18px; height: 18px; flex: none; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Мобільна поведінка ---------- */
@media (max-width: 1200px) {
    .phone-toggle__text { display: none; }
    .action-link { min-width: 46px; }
}

@media (max-width: 1024px) {
    .top-panel { display: none; }
    .header__burger { display: inline-flex; }
    .header__catalog .btn-catalog { display: none; }
    /* мобільна шапка: бургер | маленьке квадратне лого | пошук | телефон | кошик */
    .header__logo { margin-right: 0; }
    .search-form__btn { width: auto; }
    .logo__desktop { display: none !important; }
    .logo img.logo__mobile {
        display: block;
        width: 40px;

        aspect-ratio: 1 / 1;
        object-fit: contain;
    }
    .header__phone .dropdown__arrow { display: none; }
    .phone-toggle__icon { width: 28px; height: 28px; color: var(--c-text); }
    .header__cart .dropdown__toggle svg { width: 26px; height: 26px; }
    .header__actions > a.action-link,
    .header__account { display: none; }
    .header__phone .dropdown__menu--wide,
    .header__cart .dropdown__menu { width: min(360px, calc(100vw - 20px)); min-width: 0; }
    /* випадайка телефону на мобільному — під шапкою на всю ширину */
    .header__phone .dropdown__menu--wide {
        position: fixed;
        top: calc(var(--header-h) + 6px);
        left: 10px;
        right: 10px;
        width: auto;
    }
    /* flyout усередині .header__catalog має залишатися видимим
       (повноекранний каталог із бургер-меню), ховаємо лише кнопку */
    body:has(.catalog-flyout:not(.hidden)) .header { z-index: 100; }
    .quick-links { display: none; }
    .top-panel__inner { justify-content: space-between; }
    .footer__cols { grid-template-columns: repeat(2, 1fr); }
    .footer__head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 12px 0; margin-bottom: 4px; border-bottom: 1px solid var(--c-border); }
    .footer__arrow { display: inline-flex; }
    .footer__list { display: none; padding-bottom: 8px; }
    .footer__col.is-open .footer__list { display: block; }
    .footer__col.is-open .footer__arrow--down { display: none; }
    .footer__col.is-open .footer__arrow--up { display: inline-flex; }
    .footer__arrow svg { width: 18px; height: 18px; }
}

@media (max-width: 760px) {
    .header__inner { gap: 8px; padding-left: 8px; padding-right: 8px; }
    .header__search { min-width: 84px; }
    .header__phone { padding: 0 2px; }
}
