/* ============================================================================
   tepl_mobile_menu.css
   Мобильное off-canvas меню (гамбургер справа) + модалка обратного звонка.
   Подключается в include_after_body.html. Разметка — include_mobile_menu.html.

   Восстановлен 19.06.2026 (файл не попал в коммит и был утерян при сбросе
   песочницы). Содержит два блока:
     1) tmm-*            — кнопка-гамбургер, затемнение, выезжающий drawer,
                           навигация, контакты, кнопка обратного звонка;
     2) tepl-checkout-*  — модальное окно формы обратного звонка (в стиле формы
                           оформления заказа из корзины). Эти классы больше
                           НИГДЕ не определены, поэтому живут здесь.

   W3C-фикс: раньше стили были инлайновым <style> внутри <body> (ошибка
   валидатора) — вынесены в этот файл.

   Кнопка-гамбургер и drawer видны только на мобильных/планшетах (<= 992px).
   ========================================================================== */

/* FOUC-фикс: до добавления .tmm-ready на <html> прячем drawer/overlay
   статично (без переходов), чтобы меню не мелькало справа при загрузке. */
#tmm-drawer,
#tmm-overlay { transition: none; }
.tmm-ready #tmm-drawer { transition: transform .28s ease; }
.tmm-ready #tmm-overlay { transition: opacity .28s ease; }

/* ------------------------- Кнопка-гамбургер ------------------------------ */
.tmm-toggle {
    display: none; /* включается в media-запросе ниже */
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1190;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    background: #e6002a; /* фирменный красный, как tmm-drawer__logo и tmm-callback-btn */
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
}
.tmm-toggle:hover { background: #c70023; }
.tmm-toggle__bars {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
}
.tmm-toggle__bars span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
}
.tmm-toggle__label { line-height: 1; }

/* ------------------------------ Затемнение ------------------------------- */
.tmm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 10, .5);
    opacity: 0;
    z-index: 1195;
}
.tmm-overlay.is-open { opacity: 1; }

/* ------------------------------- Drawer ---------------------------------- */
.tmm-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 88%;
    max-width: 360px;
    background: #fff;
    z-index: 1200;
    transform: translateX(105%);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 28px rgba(0, 0, 0, .2);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.tmm-drawer.is-open { transform: translateX(0); }

.tmm-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #ececec;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.tmm-drawer__logo { font-size: 18px; font-weight: 800; color: #e6002a; }
.tmm-drawer__close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #444;
    cursor: pointer;
}
.tmm-drawer__close:hover { color: #2e7d32; }

.tmm-drawer__body { padding: 14px 18px 24px; }

/* ------------------------------ Навигация -------------------------------- */
.tmm-nav { list-style: none; margin: 0 0 16px; padding: 0; }
.tmm-nav__item { border-bottom: 1px solid #f0f0f0; }
.tmm-nav__link {
    display: block;
    padding: 13px 4px;
    color: #222;
    text-decoration: none;
    font-size: 16px;
}
.tmm-nav__link:hover { color: #2e7d32; }
.tmm-nav__item.is-active > .tmm-nav__link { color: #2e7d32; font-weight: 700; }

/* ------------------- Кнопка «Заказать обратный звонок» ------------------- */
.tmm-callback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 4px 0 18px;
    padding: 13px 16px;
    border: none;
    border-radius: 10px;
    background: #e6002a;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s ease;
}
.tmm-callback-btn:hover { background: #c70023; }

/* ------------------------------- Контакты -------------------------------- */
.tmm-contacts { display: flex; flex-direction: column; gap: 12px; }
.tmm-contacts__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.tmm-contacts__row--col { flex-direction: column; align-items: flex-start; gap: 2px; }
.tmm-contacts__label { font-size: 12px; color: #888; }
.tmm-contacts__phone { font-size: 17px; font-weight: 700; color: #2e7d32; text-decoration: none; }
.tmm-contacts__val { font-size: 14px; color: #333; text-decoration: none; }
.tmm-contacts__val[href]:hover { color: #2e7d32; }

/* ---------------- Показываем меню только на мобильных -------------------- */
@media (max-width: 992px) {
    .tmm-toggle { display: inline-flex; }
}
body.tmm-open { overflow: hidden; }

/* ============================================================================
   МОДАЛКА ОБРАТНОГО ЗВОНКА (tepl-checkout-*)
   Та же вёрстка/стиль, что у формы оформления заказа из корзины. Используется
   callback-модалкой мобильного меню (#tmm-callback-overlay) и доступна другим
   местам сайта. Открытие — добавлением класса .is-open на overlay.
   ============================================================================ */
.tepl-checkout-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 15, 10, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 1300;
}
.tepl-checkout-overlay.is-open { opacity: 1; visibility: visible; }

.tepl-checkout-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    padding: 28px 26px 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    transform: translateY(12px) scale(.98);
    transition: transform .2s ease;
}
.tepl-checkout-overlay.is-open .tepl-checkout-modal { transform: translateY(0) scale(1); }

.tepl-checkout-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}
.tepl-checkout-close:hover { color: #222; }

.tepl-checkout-title { font-size: 20px; font-weight: 800; margin: 0 0 8px; color: #222; }
.tepl-checkout-subtitle { font-size: 13px; line-height: 1.5; color: #666; margin: 0 0 18px; }

.tepl-checkout-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 12px 0 6px;
}
.tepl-checkout-input {
    width: 100%;
    border: 1px solid #d7dbd5;
    border-radius: 9px;
    padding: 11px 13px;
    font-size: 15px;
    color: #222;
    background: #fff;
    outline: none;
    transition: border-color .12s ease, box-shadow .12s ease;
    resize: vertical;
}
.tepl-checkout-input::placeholder { color: #aab1a6; }
.tepl-checkout-input:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, .12);
}
.tepl-checkout-input.is-invalid { border-color: #e6002a; box-shadow: 0 0 0 3px rgba(230, 0, 42, .1); }

.tepl-checkout-error { color: #e6002a; font-size: 12px; min-height: 14px; margin: 4px 0 0; }

.tepl-checkout-submit {
    width: 100%;
    margin-top: 18px;
    padding: 13px 16px;
    border: none;
    border-radius: 10px;
    background: #2e7d32;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s ease;
}
.tepl-checkout-submit:hover { background: #256528; }
.tepl-checkout-submit:disabled { opacity: .65; cursor: default; }

.tepl-checkout-hint { font-size: 11px; color: #999; text-align: center; margin-top: 10px; line-height: 1.45; }

/* Экран успеха */
.tepl-checkout-success { text-align: center; padding: 18px 8px 6px; }
.tepl-checkout-success__ico {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 32px;
}
.tepl-checkout-success__title { font-size: 19px; font-weight: 800; color: #222; margin-bottom: 8px; }
.tepl-checkout-success__text { font-size: 14px; color: #666; line-height: 1.5; margin-bottom: 18px; }

/* ============================================================================
   Корзина «уезжает» под фикс-кнопку «Меню» (только мобильный, ≤992px).

   Фикс-гамбургер .tmm-toggle прибит к правому верхнему углу (position:fixed,
   right:12px). Когда строка [Каталог|Поиск|Корзина] прилипает к верху
   (JS вешает .is-stuck при прокрутке вниз) — кнопка «Меню» оказывается над
   иконкой корзины и перекрывает её. Поэтому в прилипшем состоянии плавно
   сдвигаем корзину влево, освобождая место. При возврате наверх (класс
   .is-stuck снимается) корзина так же плавно возвращается на место.
   ============================================================================ */
@media (max-width: 992px) {
    .tepl-sticky-bar .tepl_basket {
        transition: transform .28s cubic-bezier(.22,.61,.36,1);
        will-change: transform;
    }
    /* Прилипла (прокрутка вниз) → уезжаем влево из-под кнопки «Меню». */
    .tepl-sticky-bar.is-stuck .tepl_basket {
        transform: translateX(-86px);
    }
}
