/* ============================================================
   КАТАЛОГ — ОБЩИЕ СТИЛИ
   ============================================================ */

:root {
    --green: #2e7d32;
    --green-hover: #1b5e20;
    --green-light: #e8f5e9;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e0e0e0;
    --gray-300: #bdbdbd;
    --gray-400: #9e9e9e;
    --gray-500: #757575;
    --gray-600: #616161;
    --gray-700: #424242;
    --gray-800: #212121;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --radius: 12px;
    --radius-sm: 8px;
}

/* ===== ОБЩИЕ ===== */
.shop-page .container-fluid {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 20px 20px;
}
@media (max-width: 768px) {
    .shop-page .container-fluid { padding-top: 15px; }
}

/* ===== СЕТКА ТОВАРОВ ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 0;
    list-style: none;
}
@media (max-width: 1199px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px) { .products-grid { gap: 12px; } }

/* ===== ПАНЕЛЬ УПРАВЛЕНИЯ ===== */
.catalog-control-panel { padding: 12px 0; }
.sort-select {
    padding: 8px 32px 8px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23424242' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}
.view-toggle-buttons {
    display: flex;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}
.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    color: var(--gray-400);
    border: none;
    border-right: 1px solid var(--gray-200);
    transition: 0.15s;
    text-decoration: none;
}
.view-toggle-btn:last-child { border-right: none; }
.view-toggle-btn:hover { color: var(--green); }
.view-toggle-btn.active {
    background: var(--green);
    color: #fff;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination-section { padding: 24px 0 8px; }
.pagination .page-link {
    border: none;
    color: var(--gray-600);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: transparent;
}
.pagination .page-link:hover {
    background: var(--green-light);
    color: var(--green);
}
.pagination .active .page-link {
    background: var(--green);
    color: #fff;
}

/* ===== МОБИЛЬНЫЙ ФИЛЬТР ===== */
.mobile-filters-toggle {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-align: left;
    gap: 10px;
    align-items: center;
}
@media (max-width: 991px) {
    .mobile-filters-toggle { display: flex; }
    .desktop-sidebar-wrapper { display: none; }
    .desktop-sidebar-wrapper.open {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 80vh;
        overflow-y: auto;
        background: #fff;
        z-index: 1050;
        padding: 20px;
        border-radius: var(--radius) var(--radius) 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    }
    .filters-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1040;
    }
    .filters-overlay.show { display: block; }
}