/* ============================================================
   theme-extras.css — то, чего нет во фронт-стилях
   ============================================================ */

/* ============================================================
   ОБЩИЕ АНИМАЦИИ
   ============================================================ */
.pulse-anim {
    animation: pulseAnim 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pulseAnim {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); color: #2f2e2a; }
    100% { transform: scale(1); }
}

.shake-anim {
    animation: shakeAnim 0.4s ease;
}
@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0eeea 25%, #f7f5f2 37%, #f0eeea 63%);
    background-size: 400% 100%;
    animation: skeletonShimmer 1.4s ease infinite;
    border-radius: 2px;
    color: transparent !important;
    user-select: none;
}
@keyframes skeletonShimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ============================================================
   ПУСТЫЕ СОСТОЯНИЯ — корзина, избранное, поиск
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
}
.empty-state__icon {
    width: 8rem;
    height: 8rem;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f7f5f2;
    font-size: 4rem;
    color: #b9b6ae;
}
.empty-state__title {
    font-size: 1.8rem;
    color: #2f2e2a;
    margin: 0 0 1rem;
    font-weight: 400;
    font-family: "Inter Tight", sans-serif;
}
.empty-state__text {
    color: #8a8680;
    margin: 0 auto 2.5rem;
    line-height: 1.55;
    max-width: 40rem;
    font-size: 1.4rem;
}
.empty-state__btn {
    display: inline-block;
    padding: 1.4rem 3rem;
    background: #2f2e2a;
    color: #fff !important;
    text-decoration: none;
    font-size: 1.3rem;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.empty-state__btn:hover { background: #1a1917; }
.empty-state__btn--white {
    background: #fff;
    color: #2f2e2a !important;
    border: 1px solid #2f2e2a;
}
.empty-state__btn--white:hover { background: #f7f5f2; }

/* ============================================================
   BACK-TO-TOP кнопка
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 4.4rem;
    height: 4.4rem;
    background: #2f2e2a;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
    z-index: 100;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover { background: #000; }
.back-to-top svg { width: 1.6rem; height: 1.6rem; }

/* ============================================================
   ЛОГОТИПЫ ПЛАТЕЖНЫХ СИСТЕМ В ФУТЕРЕ
   ============================================================ */
.footer__payments {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-wrap: wrap;
    padding: 2rem 0 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer__payments-label {
    color: #b9b6ae;
    font-size: 1.1rem;
    margin-right: 0.6rem;
}
.footer__payment-icon {
    height: 2rem;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.2s;
    filter: grayscale(0.3);
}
.footer__payment-icon:hover { opacity: 1; filter: none; }

/* ============================================================
   МОБИЛЬНОЕ МЕНЮ — плавный выезд + закрывающий overlay
   ============================================================ */
@media (max-width: 48em) {
    .mobil__menu {
        transition: transform 0.35s ease, right 0.35s ease;
    }
    /* Overlay для tap-close */
    .mobil__menu-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 100;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }
    .mobil__menu-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
    }

    /* Блокируем скролл фона, когда меню открыто */
    body.is-menu-open {
        overflow: hidden;
        touch-action: none;
    }

    /* Светлая тема меню — переопределяем белый текст на чёрный.
       Перебивает .mobil__menu a { color: white !important } в main.css. */
    .mobil__menu.mobil__menu-white a,
    .mobil__menu.mobil__menu-white .accordion__toggle,
    .mobil__menu.mobil__menu-white .accordion__link {
        color: var(--black) !important;
    }
    .mobil__menu.mobil__menu-white .plus::before,
    .mobil__menu.mobil__menu-white .plus::after {
        background: var(--black);
    }
}

/* ============================================================
   ВАЛИДАЦИЯ ФОРМ — ошибка / успех
   ============================================================ */
.field-error { border-color: #e74c3c !important; }
.field-error-msg {
    color: #e74c3c;
    font-size: 1.1rem;
    margin-top: 0.4rem;
    display: block;
}
.form-success {
    padding: 1.4rem;
    background: #e8f5e9;
    border-left: 3px solid #2b8a3e;
    color: #2b8a3e;
    font-size: 1.3rem;
    margin: 1rem 0;
}
.form-error-banner {
    padding: 1.4rem;
    background: #fdecea;
    border-left: 3px solid #e74c3c;
    color: #a94442;
    font-size: 1.3rem;
    margin: 1rem 0;
}

/* ============================================================
   ПОЛЕ ПОИСКА НА /search/
   ============================================================ */
.search__page-form input {
    padding: 1.4rem 1.6rem;
    border: 1px solid #dcd9d4;
    background: #fff;
    font-size: 1.4rem;
    transition: border-color 0.2s;
}
.search__page-form input:focus { outline: none; border-color: #2f2e2a; }



/* ============================================================
   КВИЗ — overlay на весь экран (фиксим заморозку страницы)
   ============================================================ */
.quiz__wrapper, .pre-order-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem;
}
.quiz__wrapper.hidden__quiz { display: none !important; }
.quiz__wrapper > .quiz {
    margin: auto;
    background: #fff;
}
.pre-order-modal.hidden { display: none !important; }
.pre-order-form {
    margin: auto;
    background: #fff;
    padding: 7rem 18rem;
    font-family: "Inter Tight", sans-serif;
    position: relative;
    font-weight: 300;
}

.close-modal {
    width: 2rem;
    height: auto;
    cursor: pointer;
    position: absolute;
    top: 2rem;
    right: 2rem;
}

/* То же самое для модалок гарантии и подтверждений */
.guaranty__wrapper,
.accepted__wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem;
    display: none;
}
.guaranty__wrapper.active,
.accepted__wrapper.active {
    display: flex !important;
}
.guaranty__wrapper > .guaranty,
.accepted__wrapper > .accepted__content {
    margin: auto;
    background: #fff;
}

.pre-order-form .modal-content {
    width: 52.5rem;
}

.pre-order-form .modal-title {
    font-size: 2.4rem;
    margin-bottom: 4rem;
}

.pre-order-form .modal-text {
    font-size: 1.5rem;
    color: #2F2E2A66;
    margin-bottom: 4rem;
}

.pre-order-product {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.pre-order-product .img-wrapper {
    position: relative;
    overflow: hidden;
    width: 13.6rem;
    height: 13rem;
}

.pre-order-product .img-wrapper img {
    width: 13.6rem;
    height: 13rem;
    object-fit: contain;
    object-position: center;
}

.pre-order-product-desc {
    width: 37.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 1.3rem;
}

.pre-order-product-name {
    font-size: 1.5rem;
}

.pre-order-product-warning {
    color: #A50F0F;
}

.pre-order-product-field {
    color: #2F2E2A66;
}

.pre-order-form-data {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.pre-order-form-data input {
    border: 0;
    background-color: #F6F6F6;
    color: black;
    font-family: "Inter Tight", sans-serif;
    font-weight: 300;
    width: 100%;
    box-sizing: border-box;
    padding: 1.6rem 1.2rem;
    font-size: 1.5rem;
}

.pre-order-form-data input::placeholder {
    font-family: "Inter Tight", sans-serif;
    font-weight: 300;
    color: #2F2E2A66;
    font-size: 1.5rem;
}

.pre-order-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.pre-order-actions button {
    border: 1px solid #2F2E2A;
    min-width: 25.8rem;
    font-size: 1.5rem;
    background-color: white;
    color: #2F2E2A;
    cursor: pointer;
    padding: 2rem;
    text-align: center;
}

.pre-order-actions button.f-button-black {
    background-color: #2F2E2A;
    color: white;
}

@media (max-width: 48em) {
    .pre-order-form {
        padding: 2rem 1.6rem;
    }

    .pre-order-form .modal-content {
        width: 33rem;
    }

    .pre-order-form .modal-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .pre-order-form .modal-text {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }

    .pre-order-product {
        margin-bottom: 2rem;
    }

    .pre-order-product .img-wrapper, .pre-order-product .img-wrapper img {
        width: 10rem;
        height: 10rem;
    }

    .pre-order-product-desc {
        width: 21rem;
    }

    .pre-order-form-data {
        gap: 1rem;
    }

    .pre-order-actions button {
        min-width: 16rem;
        font-size: 1.3rem;
        padding: 1.2rem;
    }
}

/* ============================================================
   DESKTOP DROPDOWN MENU (мега-меню)
   ============================================================ */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1917;
    color: #fff;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    padding: 4rem 0 4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.mega-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-menu__inner {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3rem;
}
.mega-menu__col-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0 0 1.6rem;
    font-family: "Inter Tight", sans-serif;
}
.mega-menu__list {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}
.mega-menu__item { margin: 0 0 0.8rem; }
.mega-menu__link {
    color: #b9b6ae;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.2s;
    font-family: "Inter Tight", sans-serif;
}
.mega-menu__link:hover { color: #fff; }
.mega-menu__col--single .mega-menu__col-title {
    cursor: pointer;
}
.mega-menu__col--single .mega-menu__col-title:hover { opacity: 0.7; }

/* Триггер хедера, при ховере показывает меню */
.header__nav-trigger { position: relative; }

@media (max-width: 64em) {
    .mega-menu { display: none; }
}

/* ============================================================
   АНИМАЦИИ — добавление в избранное / корзину
   ============================================================ */
.favorite { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.favorite.active { animation: favoritePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes favoritePop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.favorite__in { transition: fill 0.3s ease, stroke 0.3s ease; }
.favorite.active .favorite__in,
.favorite__in.active {
    fill: #2f2e2a !important;
    stroke: #2f2e2a !important;
}

/* Тост */
.ui-toast {
    position: fixed;
    top: 2.4rem;
    left: 50%;
    transform: translate(-50%, -120%);
    background: #2f2e2a;
    color: #fff;
    padding: 1.2rem 2rem;
    font-size: 1.3rem;
    z-index: 2000;
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    white-space: nowrap;
}
.ui-toast.visible { transform: translate(-50%, 0); opacity: 1; }
.ui-toast--success { background: #2b8a3e; }
.ui-toast--warn    { background: #c49a3c; }
.ui-toast--error   { background: #e74c3c; }

/* Летящая картинка в корзину */
.fly-to-cart {
    position: fixed;
    z-index: 1500;
    pointer-events: none;
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    transition: all 0.75s cubic-bezier(0.55, -0.2, 0.8, 0.25);
    object-fit: cover;
    background: #fff;
}
.header__link .bag-bump,
.header__img.bag-bump { animation: bagBump 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes bagBump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.4); }
    70%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}

.js-add-to-cart.js-in-cart {
    background: #2f2e2a !important;
    color: #fff !important;
    border-color: #2f2e2a !important;
}

/* ============================================================
   ПАГИНАЦИЯ
   ============================================================ */
.catalog__navigation { gap: 0.6rem; align-items: center; padding: 3rem 0; }
.catalog__navigation__content { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 2rem !important; }
.catalog__navigation__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.6rem;
    height: 3.6rem;
    padding: 0 0.8rem;
    border: 1px solid transparent;
    color: #8a8680;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    font-size: 1.4rem;
    border-radius: 2px;
}
.catalog__navigation__number:hover { color: #2f2e2a; border-color: #dcd9d4; }
.catalog__navigation__number.active {
    background: #2f2e2a; color: #fff;
    border-color: #2f2e2a; cursor: default;
}
.catalog__navigation__arrow { transition: transform 0.2s, opacity 0.2s; }
.catalog__navigation a:hover .catalog__navigation__arrow { transform: translateX(2px); }
.catalog__navigation a:first-child:hover .catalog__navigation__arrow { transform: translateX(-2px); }

@media (max-width: 768px) {
    .catalog__navigation__content { margin: 0 1rem !important; gap: 0.2rem; }
    .catalog__navigation__number { min-width: 3rem; height: 3rem; font-size: 1.2rem; }
}

/* ============================================================
   БЛОК ПОЛУЧАТЕЛЯ В ФОРМЕ ПОДАРОЧНОЙ КАРТЫ
   ============================================================ */
.voucher__recipient {
    margin: 2rem 0 1.5rem;
    padding: 2rem;
    background: #f7f5f2;
    border: 1px solid #ebe8e3;
}
.voucher__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.4rem;
}
.voucher__tab {
    padding: 1.2rem;
    border: 1px solid #dcd9d4;
    background: #fff;
    text-align: center;
    cursor: pointer;
    font-size: 1.3rem;
    color: #8a8680;
    transition: all 0.2s;
    user-select: none;
}
.voucher__tab--active {
    border-color: #2f2e2a;
    color: #2f2e2a;
    font-weight: 500;
}
.voucher__input,
.voucher__textarea {
    width: 100%;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    border: 1px solid #dcd9d4;
    background: #fff;
    font-size: 1.3rem;
    font-family: inherit;
    color: #2f2e2a;
    box-sizing: border-box;
}
.voucher__input:focus,
.voucher__textarea:focus { outline: none; border-color: #2f2e2a; }
.voucher__textarea { resize: vertical; min-height: 8rem; }

/* ============================================================
   РАСШИРЕННАЯ ГАРАНТИЯ В ЛК — статусы и блок заявок
   ============================================================ */
.account__warranty .warranty__order { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.4rem; }
.account__warranty .order__card {
    border: 1px solid #ebe8e3;
    padding: 1.2rem 1.4rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    background: #fff;
    transition: border-color 0.2s;
}
.account__warranty .order__card:hover { border-color: #2f2e2a; }
.account__warranty .order__block { display: flex; gap: 1rem; align-items: center; }
.account__warranty .order__picture { width: 5.5rem; height: 5.5rem; object-fit: cover; }
.account__warranty .warranty-right { text-align: right; display: flex; flex-direction: column; justify-content: space-between; }
.warranty-status-pending { color: #c49a3c; }
.warranty-status-active  { color: #2b8a3e; }
.warranty-status-done    { color: #8a8680; }
.warranty-status-rejected{ color: #e74c3c; }

.account__btns { display: flex; gap: 1rem; margin-top: 1.6rem; flex-wrap: wrap; }
.account__warranty-btn {
    flex: 1;
    padding: 1.2rem 1.4rem;
    font-size: 1.3rem;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid #2f2e2a;
    background: #fff;
    color: #2f2e2a;
    transition: all 0.2s;
    min-width: 18rem;
}
.account__warranty-black { background: #2f2e2a; color: #fff; }
.account__warranty-btn:hover { opacity: 0.88; }

/* ============================================================
   ПОЛИРОВКА ПОЛЕЙ ОФОРМЛЕНИЯ ЗАКАЗА
   ============================================================ */
.checkout__delivery .checkout__choice {
    border: 1px solid #ebe8e3;
    padding: 1.2rem 1.4rem;
    margin-bottom: 0.6rem;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.checkout__delivery .checkout__choice:hover { border-color: #2f2e2a; }
.checkout__delivery .checkout__choice:has(input:checked) {
    border-color: #2f2e2a;
    background: #f7f5f2;
}
#js-delivery-cost,
#js-delivery-pickup-cost {
    font-size: 1.25rem;
    color: #2f2e2a;
    padding: 0.8rem 1rem;
    background: #f3f1ee;
    border-left: 2px solid #2f2e2a;
}
#js-delivery-cost:empty,
#js-delivery-pickup-cost:empty { display: none; }

#js-city-dropdown > div {
    padding: 0.8rem 1.2rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f3f1ee;
}
#js-city-dropdown > div:last-child { border-bottom: none; }
#js-city-dropdown > div:hover { background: #f3f1ee; }

.checkout__paying .checkout__text {
    border: 1px solid #ebe8e3;
    padding: 1.2rem 1.4rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.checkout__paying .checkout__text:hover { border-color: #2f2e2a; }
.checkout__paying .checkout__text:has(input:checked) {
    border-color: #2f2e2a;
    background: #f7f5f2;
}
.checkout__paying-img { height: 2rem; width: auto; margin-left: auto; object-fit: contain; }
.checkout__paying-img.img-split { height: 1.8rem; }

/* Адреса в настройках */
.js-addr-item { transition: background 0.15s; }
.js-addr-item:hover { background: #f7f5f2; }
.js-addr-delete:hover { text-decoration: underline; }

.account__card { transition: box-shadow 0.2s, transform 0.2s; }
.account__card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}
.account__card-btn { cursor: pointer; transition: opacity 0.2s; }
.account__card-btn:hover { opacity: 0.7; }

.account__point-red { color: #e74c3c !important; }
.account__point-smooth { color: #2b8a3e !important; }

.account__setting-item { transition: background 0.15s; }
.account__setting-item:hover { background: #f7f5f2; }

.account__bonus { display: flex; gap: 1rem; }
.account__bonus-block {
    flex: 1;
    padding: 1.4rem 1.6rem;
    background: #f7f5f2;
    border-left: 2px solid #2f2e2a;
}
