/* ===== МОБИЛЬНЫЕ ФИКСЫ + YA.RU СТИЛИ ===== */

/* ЛК и мелкие экраны */
@media (max-width: 768px) {
    .main { padding: 0 12px !important; }
}

/* Нижняя навигация (мобильная) */
/* Нижнее меню */
.ya-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .ya-bottom-nav { display: flex; }
    body { padding-bottom: 60px !important; }
}

.ya-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    color: #999;
    text-decoration: none;
    padding: 4px;
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.ya-bottom-nav .nav-item.active {
    color: #fc3f1d;
}

.ya-bottom-nav .nav-item .icon {
    font-size: 22px;
    line-height: 1;
}

/* Bottom-sheet (заказ) */
.ya-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}

.ya-modal-overlay.active {
    display: flex;
}

.ya-modal-sheet {
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 32px;
    animation: yaSlideUp 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes yaSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}


/* ===== АДАПТАЦИЯ ДЛЯ БОЛЬШИХ ЭКРАНОВ (MacBook, iMac, ПК) ===== */
@media (min-width: 1024px) {
    /* Расширяем основной контейнер */
    .container {
        max-width: 1200px !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    /* Блок подбора по авто делаем шире и красивее */
    .ya-car-selector {
        margin: 20px auto;
        padding: 24px;
    }

    .ya-car-fields select {
        font-size: 16px;
        padding: 14px 36px 14px 16px;
    }

    .ya-btn-find {
        font-size: 16px;
        padding: 14px 32px;
    }

    /* Карточки товаров в каталоге — по 3 или 4 в ряд */
    .catalog-products-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 колонки на десктопе */
    }
}

/* Для очень широких экранов (от 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1200px !important; /* Растягиваем на всю ширину MacBook Pro 16" */
    }

    .catalog-products-grid {
        grid-template-columns: repeat(4, 1fr) !important; /* 4 колонки */
    }
}
