/* 1. ПЕРЕМЕННЫЕ И ОСНОВНЫЕ НАСТРОЙКИ */
:root {
    --brand-green: #5cb85c;
    --brand-green-hover: #4cae4c;
    --brand-purple: #b026ff;
    --brand-orange: #ff9d00;
    --bg-light: #f8f9fa;
    --text-dark: #1a1a1a;
    --text-muted: #8e8e93;
    --border-color: #f0f0f0;
    --l-light-gray: #f4f4f4;
    --white: #ffffff;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.08);

    /* Новые переменные для "Живого поиска" */
    --suggest-bg: var(--white);
    --suggest-shadow: var(--shadow-md);
    --suggest-border: var(--border-color);
    --suggest-hover: var(--bg-light);
    --suggest-accent: var(--brand-purple); /* Используем твой фиолетовый для цены */
}

/* Универсальные стили выпадающего списка */
.botiq-suggest-wrapper {
    position: absolute;
    z-index: 9999;
    background: var(--suggest-bg);
    border: 1px solid var(--suggest-border);
    border-radius: 12px;
    box-shadow: var(--suggest-shadow);
    display: none;
    overflow: hidden;
    margin-top: 8px;
    width: 100%;
    animation: botiqFadeIn 0.2s ease-out;
}

@keyframes botiqFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.botiq-suggest-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-dark);
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.botiq-suggest-item:last-child { border-bottom: none; }
.botiq-suggest-item:hover { background: var(--suggest-hover); text-decoration: none; color: inherit; }

.botiq-suggest-img {
    width: 45px; height: 45px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
    background: var(--l-light-gray);
}

.botiq-suggest-info { flex-grow: 1; min-width: 0; }
.botiq-suggest-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.botiq-suggest-price { font-size: 13px; color: var(--suggest-accent); font-weight: 800; }

body { 
    background-color: var(--bg-light); 
    font-family: 'Inter', sans-serif; 
    color: var(--text-dark);
    line-height: 1.5;
}

/* 2. ШАПКА САЙТА (HEADER) */
.main-header {
    z-index: 1020;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.logo { font-size: 24px; font-weight: 800; display: block; }
.logo-l { color: var(--brand-green); }
.logo-store { color: var(--text-dark); }

.btn-catalog {
    background: var(--brand-green);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
}


.btn-catalog:hover {
    background: var(--brand-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(92, 184, 92, 0.2);
}

/* ПОИСК */
.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper .form-control {
    border-radius: 12px;
    border: 2px solid var(--l-light-gray);
    padding: 12px 60px 12px 20px;
    background: var(--l-light-gray);
    font-size: 15px;
    transition: all 0.2s ease;
}

.search-wrapper .form-control:focus {
    border-color: var(--brand-green);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(92, 184, 92, 0.1);
    outline: none;
}

.btn-search-icon {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    background: var(--brand-green);
    color: var(--white);
    border: none;
    border-radius: 9px;
    padding: 0 16px;
    transition: background 0.2s;
}

.btn-search-icon:hover { background: var(--brand-green-hover); }

/* ИКОНКИ В ШАПКЕ */
.header-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s;
}

.header-icon-link i { font-size: 24px; margin-bottom: 2px; position: relative; }
.header-icon-link:hover { color: var(--brand-green); }

.cart-badge {
    position: absolute;
    top: -4px;
    right: -10px;
    background: var(--brand-green);
    color: var(--white);
    font-size: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
    font-weight: 700;
}

/* 3. КАРТОЧКА ТОВАРА (PRODUCT CARD) */

/* Убираем синий цвет и подчеркивание у ссылки в заголовке */
.product-card .product-title a {
    color: #000; /* Или твой конкретный цвет текста */
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Эффект при наведении (опционально) */
.product-card:hover .product-title a {
    color: #333; /* Немного меняем оттенок при наведении на карточку */
    text-decoration: none; /* Гарантируем отсутствие подчеркивания при ховере */
}

/* Убеждаемся, что stretched-link не мешает отображению текста */
.stretched-link {
    color: inherit;
    text-decoration: none;
}




.product-card {
    background: var(--white);
    border-radius: 22px;
    padding: 20px;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
}

/* Вертикальные бейджи */
.product-badges {
    position: absolute;
    top: 20px;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.badge-hit, .badge-popular {
    writing-mode: vertical-rl;
    transform: rotate(0deg);
    padding: 12px 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--white);
    border-radius: 0 8px 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-hit { background: var(--brand-purple); }
.badge-popular { background: var(--brand-orange); }

/* Изображение товара */
.product-img-wrap {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    cursor: pointer;
    overflow: hidden;
}

.product-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

/* Инфо блок */
.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-cat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 14px;
    cursor: pointer;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    transition: color 0.2s;
}

.product-title:hover { color: var(--brand-green); }

/* Блок цены */
.product-price-block {
    margin-top: auto;
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
}

.old-price-value {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Кнопка действия */
.btn-add-to-cart {
    background-color: var(--brand-green);
    color: var(--white);
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-add-to-cart:hover {
    background-color: var(--brand-green-hover);
    box-shadow: 0 4px 12px rgba(92, 184, 92, 0.3);
}

.btn-add-to-cart i { font-size: 18px; }

/* БАННЕРЫ С SVG ФОНОМ */
.banner-svg-card {
    position: relative;
    height: 220px;
    border-radius: 28px;
    overflow: hidden;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border: none;
}

.banner-svg-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.banner-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 3;
    color: #ffffff;
    width: 65%;
}

.banner-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.banner-link-item {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.banner-link-item:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding-left: 20px;
}

.banner-product-img {
    position: absolute;
    right: -15px;
    bottom: -10px;
    height: 190px;
    width: auto;
    z-index: 2;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.25));
    transition: all 0.5s ease;
}

.banner-svg-card:hover .banner-product-img {
    transform: scale(1.08) rotate(-2deg);
    filter: drop-shadow(0 20px 35px rgba(0,0,0,0.3));
}

/* КНОПКА "ПОКАЗАТЬ ЕЩЕ" */
.btn-white {
    background: #ffffff;
    color: #1a1a1a;
}
.btn-white:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.transition-all { transition: all 0.3s ease; }

/* АДАПТИВНОСТЬ */
@media (max-width: 991px) {
    .banner-svg-card { height: 200px; padding: 20px; }
    .banner-title { font-size: 22px; }
    .banner-product-img { height: 160px; }
}

@media (max-width: 576px) {
    .banner-svg-card { height: 180px; }
    .banner-content { width: 75%; }
    .banner-product-img { height: 140px; right: -5px; }
}
/* 5. САЙДБАР (SIDEBAR) */
.sidebar-block {
    border: none;
    box-shadow: var(--shadow-sm);
}

.sidebar-menu .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-menu .nav-link:hover, 
.sidebar-menu .nav-link.active {
    background: rgba(92, 184, 92, 0.1);
    color: var(--brand-green);
}

/* Адаптивность для мобилок */
@media (max-width: 768px) {
    .product-card { padding: 15px; border-radius: 18px; }
    .product-img-wrap { height: 140px; }
    .price-value { font-size: 17px; }
    .banner-cat { height: 180px; padding: 20px; }
    .banner-cat h2 { font-size: 20px; }
    .banner-img { height: 130px; }
}


/* --- СТИЛИ ДЛЯ FULLSTORY (L-STORE STYLE) --- */

/* Контейнер страницы (фон обычно задан в body, но здесь уточняем) */
.container.pb-5 {
    background-color: transparent;
}

/* ЛЕВАЯ СТОРОНА: Белая карточка с фото */
.product-gallery-card {
    background-color: #ffffff !important;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: none;
    overflow: hidden;
}

.main-full-img {
    height: 380px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-gallery-card:hover .main-full-img {
    transform: scale(1.02);
}

.btn-cart-full {
    background-color: #62c56a; /* Твой зеленый */
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%; /* Обычно в фулл-карточке кнопка на всю ширину */
}

.btn-cart-full:hover {
    background-color: #52a459;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(98, 197, 106, 0.3);
}

/* Кнопка "Купить сейчас" */
.btn-buy-now {
    background-color: #1f1f1f; /* Глубокий черный */
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 14px; /* Мягкое скругление как у Самоката */
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-buy-now:hover {
    background-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Контейнер для кнопок, чтобы на мобилках они могли встать друг под другом */
@media (max-width: 576px) {
    .action-buttons {
        flex-direction: column;
    }
}



/* CART */

/* Анимация встряски иконки корзины */
@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cart-bounce {
    animation: cartBounce 0.3s ease-in-out;
}

/* Стиль счетчика, если он еще не настроен */
.cart-count {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}



/* Полоска загрузки вверху страницы */
#ajax-container {
    transition: opacity 0.3s ease-in-out;
}

.loading-progress::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #5cb85c, #2ecc71);
    z-index: 9999;
    animation: load-bar 2s infinite;
}

@keyframes load-bar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}



.botiq-flyer {
    position: fixed !important;
    z-index: 999999 !important;
    width: 60px; /* Сделаем чуть крупнее на старте */
    height: 60px;
    border-radius: 50%;
    pointer-events: none;
    border: 2px solid #198754;
    background-color: #fff; /* Фон только для того, чтобы рамка была видна */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    /* Анимация перехода */
    transition: 
        left 0.8s cubic-bezier(0.42, 0, 0.58, 1), 
        top 0.8s cubic-bezier(0.42, 0, 0.58, 1), 
        transform 0.8s ease-in, 
        opacity 0.8s ease-in !important;
}

/* Анимация пульсации корзины при "попадании" */
@keyframes cart-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cart-bounce-active {
    animation: cart-bounce 0.4s ease-in-out;
    display: inline-block;
}







.botiq-error-state .icon-wrapper i {
    filter: drop-shadow(0 10px 15px rgba(220, 53, 69, 0.2));
}
.botiq-btn-custom:hover {
    background-color: #4cae4c !important; /* На тон темнее основного #5cb85c */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(92, 184, 92, 0.3) !important;
}

.botiq-btn-custom:active {
    transform: translateY(0);
}


.botiq-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: none;
    animation: fadeInOut 3s forwards;
}
@keyframes fadeInOut {
    0% { opacity: 0; bottom: 0; }
    15% { opacity: 1; bottom: 20px; }
    85% { opacity: 1; bottom: 20px; }
    100% { opacity: 0; bottom: 0; }
}


/* Стили для селектора в каталоге */
.qty-catalog-controls {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 5px;
    border: 1px solid #eee;
    height: 44px; /* Высота должна совпадать с кнопкой Купить */
}

.btn-qty-minus, .btn-qty-plus {
    background: #fff;
    border: 1px solid #ddd;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-qty-minus:hover, .btn-qty-plus:hover {
    background: #198754;
    color: white;
    border-color: #198754;
}

.qty-val {
    font-size: 16px;
    min-width: 30px;
    text-align: center;
}




#botiq-side-cart.open {
    right: 0 !important;
}

.side-cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px border-bottom: 1px solid #f0f0f0;
}

.side-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

#clearCartModal .modal-content {
    border: none !important;
}
/* Чтобы кнопки не сливались с фоном при наведении */
#clearCartModal .btn-light:hover {
    background-color: #e9ecef;
}

/* Если нет класса модалки или открытой корзины — скролл обязан быть */
body:not(.modal-open):not(.side-cart-open) {
    overflow: auto !important;
}

/* ПРИНУДИТЕЛЬНОЕ ВЫРАВНИВАНИЕ С ОТСТУПОМ */

/* 1. Задаем общий отступ для всей секции (те самые 60px) */
.container.my-4 {
    margin-top: 60px !important;
}

/* 2. Обнуляем внутренние отступы колонок, чтобы они стартовали одновременно */
.row.align-items-start > aside,
.row.align-items-start > main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 3. Гарантируем, что первый элемент контента не имеет своего марджина */
#content-area > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 4. Фикс для контейнера (убирает микро-зазоры) */
#ajax-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* 5. Хак для очистки потока */
#content-area::before {
    content: "";
    display: table;
    clear: both;
}

.footer-area {
    background-color: #111111; /* Глубокий черный/серый как на скрине */
    color: #888888;
    margin-top: 80px; /* Отступ от контента */
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu li a {
    color: #888888;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-menu li a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: #222222;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}

.social-icon:hover {
    background: var(--brand-green); /* Твой зеленый из шапки */
    color: white;
    transform: translateY(-3px);
}

.pay-icon {
    height: 24px;
    filter: grayscale(1) opacity(0.6);
    transition: 0.3s;
}

.pay-icon:hover {
    filter: grayscale(0) opacity(1);
}

/* Адаптивность для мобилок */
@media (max-width: 768px) {
    .footer-area {
        text-align: center;
    }
    .payment-methods {
        justify-content: center !important;
    }
    .social-links {
        justify-content: center;
        margin-bottom: 30px;
    }
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px !important;
    height: 50px !important;
    background-color: #28a745 !important; /* Временно жесткий цвет для теста */
    color: #ffffff !important;
    border-radius: 50%; /* Сделаем круглой, так заметнее */
    display: none; /* Скроем по умолчанию, JS включит flex */
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    z-index: 999999; /* Максимальный приоритет */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid #fff;
}

.scroll-to-top.show {
    display: flex !important; /* Показываем через flex */
}

/* 1. Глобальная анимация Shimmer (Бегущий блик) */
.skeleton {
    background: #f0f0f0;
    background: linear-gradient(
        90deg, 
        #f0f0f0 25%, 
        #f8f8f8 50%, 
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: botiq-shimmer 1.5s infinite;
    border-radius: 8px;
    display: block; /* Чтобы корректно работали размеры */
}

@keyframes botiq-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 2. Контейнер карточки (должен повторять размеры реальной карточки) */
.skeleton-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    height: 100%;
    border: 1px solid #f2f2f2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); /* Легкая тень для объема */
    display: flex;
    flex-direction: column;
}

/* 3. Элементы внутри */
.skeleton-img {
    width: 100%;
    aspect-ratio: 1/1; /* Сохраняет квадрат под фото товара */
    margin-bottom: 12px;
    border-radius: 12px;
}

.skeleton-title {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-price {
    height: 20px;
    width: 50% !important;
    margin-bottom: 15px;
    border-radius: 4px;
}

.skeleton-btn {
    height: 38px;
    width: 100%;
    border-radius: 10px;
    margin-top: auto; /* Прижимает "кнопку" вниз, если заголовки разной длины */
}

/* Обертка, которую мы создаем в JS, чтобы не ломать сетку Bootstrap */
.botiq-skeleton-wrapper {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

/* =========================================================================
   БЛОКИРОВКА СКРОЛЛА (BODY CONTROL)
   ========================================================================= */
body.modal-open, 
body.stop-scrolling {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    position: fixed !important; /* Гарантирует остановку скролла на iOS */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* =========================================================================
   ОВЕРЛЕЙ И КАРТОЧКА
   ========================================================================= */

/* Профессиональный оверлей (Force Display) */
.auth-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6) !important; /* Темный фон для контраста */
    display: none; /* Управляется через JS */
    align-items: center;
    justify-content: center;
    z-index: 999999 !important; /* Максимальный приоритет */
    backdrop-filter: blur(10px); /* Размытие */
    -webkit-backdrop-filter: blur(10px);
    
    /* SPA HARD LOCK: Запрещаем передачу скролла на нижние слои */
    touch-action: none; 
    overscroll-behavior: contain; /* Предотвращает прокрутку родителя в SPA */
    
    /* Фикс для оверлея: если сама карточка не влезает в экран (на мелких моб.) */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Сама карточка внутри */
.auth-card {
    background: #ffffff !important;
    padding: 30px !important;
    border-radius: 24px !important;
    width: 90% !important;
    max-width: 360px !important;
    z-index: 1000000 !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
    position: relative; /* Чтобы кнопка закрытия позиционировалась верно */
    
    /* Возвращаем взаимодействие внутри карточки */
    touch-action: auto; 
    overscroll-behavior: auto;
}

/* ВСПОМОГАТЕЛЬНЫЙ КЛАСС ДЛЯ BODY (Добавлять через JS при открытии) */
body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    /* position: fixed; — Если SPA на мобильном всё еще дергается, включи это в JS */
}

/* =========================================================================
   ЭЛЕМЕНТЫ ДИЗАЙНА (БЕЗ ИЗМЕНЕНИЯ ЦВЕТОВ)
   ========================================================================= */

/* Кнопка закрытия */
.auth-close-btn {
    position: absolute;
    top: 20px; right: 20px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #f8f9fa;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-close-btn:hover { background: #e9ecef; color: #333; }

/* Иконка и заголовки */
.auth-main-icon {
    font-size: 48px;
    color: var(--brand-green, #2481cc);
    margin-bottom: 15px;
    text-align: center;
}
#auth-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #212529;
    margin-bottom: 8px;
}
#auth-subtitle {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Поля ввода */
.input-group-custom label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-left: 5px;
}
.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}
.input-icon {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 18px;
}
#auth-main-input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border-radius: 14px;
    border: 2px solid #f1f3f5;
    background: #f8f9fa;
    font-size: 16px;
    transition: 0.3s;
    outline: none;
    box-sizing: border-box; /* Важно, чтобы padding не ломал ширину */
}
#auth-main-input:focus {
    border-color: var(--brand-green, #2481cc);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(36, 129, 204, 0.1);
}

/* Кнопка отправки */
.btn-auth-primary {
    width: 100%;
    height: 54px;
    background: var(--brand-green, #2481cc);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 8px 20px rgba(36, 129, 204, 0.25);
}
.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(36, 129, 204, 0.35);
}

/* Разделитель Telegram */
.tg-auth-section {
    margin-top: 25px;
}
.divider {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
}
.divider::before {
    content: "";
    position: absolute;
    top: 50%; left: 0;
    width: 100%; height: 1px;
    background: #eee;
    z-index: 1;
}
.divider span {
    background: #fff;
    padding: 0 15px;
    color: #bbb;
    font-size: 12px;
    position: relative;
    z-index: 2;
}

/* Ошибки */
.auth-status-alert {
    display: none;
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    background: #fff5f5;
    color: #e74c3c;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}



.pagination-wrapper .pagination {
    gap: 8px;
    border: none;
}

.pagination-wrapper .page-item .page-link {
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    color: #475569;
    font-weight: 700;
    background: #f8fafc;
    transition: 0.3s;
}

.pagination-wrapper .page-item.active .page-link {
    background: #28a745;
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(40,167,69,0.3);
}

.pagination-wrapper .page-item .page-link:hover:not(.active) {
    background: #e2e8f0;
    transform: translateY(-2px);
}





/* Состояние загрузки (управляется через JS) */
body.loading-active #search-spinner {
    display: block !important;
}
/* Скрываем иконку лупы, когда крутится спиннер, чтобы не было каши */
body.loading-active .btn-search-icon {
    opacity: 0;
}




/* --- ГЛАВНЫЙ КОНТЕЙНЕР ССЫЛКИ --- */
.samokat-link {
    display: flex;
    align-items: center;
    padding: 8px 12px; /* Умеренные отступы для аккуратного вида */
    text-decoration: none !important;
    background: transparent;
    border: none !important;
    border-radius: 14px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

/* --- СОСТОЯНИЯ: НАВЕДЕНИЕ И АКТИВНОСТЬ --- */
/* При наведении или когда категория выбрана — фон становится зеленым */
.samokat-link:hover, 
.samokat-link.active {
    background-color: #5cb85c !important;
}

/* При наведении/активе: Текст и Счетчик становятся БЕЛЫМИ */
.samokat-link:hover .samokat-title,
.samokat-link.active .samokat-title,
.samokat-link:hover .samokat-count,
.samokat-link.active .samokat-count {
    color: #ffffff !important;
}

/* --- ИКОНКА И ЕЁ ПОДЛОЖКА --- */
.samokat-icon-bg {
    width: 44px;
    height: 44px;
    background-color: #F2F3F5; /* Стандартный серый фон */
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

/* При наведении/активе: Подложка иконки становится светлее/прозрачнее */
.samokat-link:hover .samokat-icon-bg,
.samokat-link.active .samokat-icon-bg {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* При наведении/активе: Шрифтовая иконка (Bootstrap) становится БЕЛОЙ */
.samokat-link:hover .samokat-icon,
.samokat-link.active .samokat-icon {
    color: #ffffff !important;
}

/* При наведении/активе: КАРТИНКА становится БЕЛОЙ (магия фильтров) */
.samokat-link:hover .samokat-img,
.samokat-link.active .samokat-img {
    filter: brightness(0) invert(1);
}

/* --- СТИЛИ ЭЛЕМЕНТОВ (ПО УМОЛЧАНИЮ) --- */
.samokat-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1F1F1F;
    line-height: 1.2;
    margin-left: 12px; /* Отступ от иконки */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.samokat-icon {
    font-size: 1.5rem;
    color: #4D4E50;
    line-height: 1;
    transition: color 0.2s ease;
}

.samokat-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    transition: filter 0.2s ease;
}

.samokat-count {
    font-size: 0.8rem;
    color: #A6A7AB;
    margin-left: auto; /* Прижимает счетчик вправо */
    padding-left: 10px;
    flex-shrink: 0;
    transition: color 0.2s ease;
}












/* Кнопка каталога (если еще нет стилей) */
.btn-catalog {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background-color: #62c56a; /* Твой зеленый */
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-catalog:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(98, 197, 106, 0.3);
}

/* Оверлей (фон при открытии) */
.catalog-overlay {
    position: fixed;
    top: 80px; /* Высота твоей шапки */
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px); /* Размытие как в iOS */
    display: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.catalog-overlay.active {
    display: block;
    opacity: 1;
}

/* Окно каталога */
.catalog-wrapper {
    background: white;
    margin-top: 20px;
    overflow: hidden;
    min-height: 500px;
}

/* Навигация внутри */
.catalog-main-nav .samokat-link {
    border-radius: 12px;
    margin-bottom: 5px;
}

.catalog-main-nav .samokat-link:hover {
    background-color: #f2f3f5;
}





/* Контейнер карточки */
.mini-card {
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease-in-out;
    height: 100%;
}

.mini-card:hover {
    border-color: #62c56a; /* Твой зеленый */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* Обертка для фото */
.mini-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1; /* Квадратная область */
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

.mini-img-wrapper img {
    max-height: 80%;
    object-fit: contain;
}

/* Цена */
.mini-price {
    font-size: 0.9rem;
    color: #1f1f1f;
}

/* Название */
.mini-name {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Обрезает длинное название */
}


/* Контейнер ссылки в каталоге */
.catalog-nav-link {
    text-decoration: none !important;
    color: #333;
    transition: all 0.2s ease;
    background: transparent;
}

/* Эффект при наведении внутри выпадающего меню */
.catalog-nav-link:hover {
    background-color: #ffffff; /* Белый фон на серой подложке */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateX(5px); /* Легкий сдвиг вправо */
}

/* Акцентный цвет текста при наведении */
.catalog-nav-link:hover .catalog-nav-title {
    color: #62c56a; /* Твой зеленый */
}

/* Подложка иконки в каталоге (чуть меньше основной) */
.catalog-nav-icon-bg {
    width: 36px;
    height: 36px;
    background-color: #f2f3f5;
    border-radius: 10px;
    flex-shrink: 0;
}

.catalog-nav-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.catalog-nav-icon {
    font-size: 1.1rem;
    color: #555;
}

/* Текст названия */
.catalog-nav-title {
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

/* При наведении на строку — стрелочка становится ярче */
.catalog-nav-link:hover .bi-chevron-right {
    opacity: 1 !important;
    color: #62c56a;
}

