﻿/* Контейнер всей страницы */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

/* Заголовок и хлебные крошки */
.page-header {
    margin-bottom: 20px;
}

    .page-header h1 {
        font-size: 28px;
        margin: 0 0 10px 0;
    }
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
}

    .pagination a {
        background: none;
        color: inherit;
        text-decoration: none;
        padding: 5px;
        margin: 0 5px;
        cursor: pointer;
        border: none;
    }

        .pagination a:hover {
            text-decoration: underline;
        }

        .pagination a.active {
            font-weight: bold;
            text-decoration: underline;
        }
.breadcrumbs a {
    color: #666;
    text-decoration: none;
    margin-right: 5px;
}

    .breadcrumbs a:hover {
        text-decoration: underline;
    }

/* Основная область: фильтры + карточки */
.main-content {
    display: flex;
    gap: 20px;
}

/* Фильтры */
.filters-panel {
    flex: 0 0 250px;
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
}

/* Стили формы фильтров остаются прежними */
.filters-form .filter-group {
    margin-bottom: 20px;
}

.filter-group h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.range-block {
    display: flex;
    gap: 10px;
    align-items: center;
}

    .range-block label {
        white-space: nowrap;
    }

.filters-panel select {
    width: 160px;
    padding: 5px;
    font-size: 14px;
    margin-bottom: 5px;
}

.filters-panel input[type="number"] {
    width: 80px;
    padding: 5px;
    font-size: 14px;
    margin-bottom: 5px;
}

.apply-filters-btn {
    width: 100%;
    background-color: rgba(0, 123, 255, 0.7);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
}

    .apply-filters-btn:hover {
        background-color: rgba(0, 123, 255, 1);
    }

/* Overlay для мобильных фильтров */
.filters-overlay {
    display: none;
}

    .filters-overlay.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 900;
    }

/* Правая часть */
.cards-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Панель сортировки */
.sort-panel {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .sort-panel label {
        font-size: 14px;
    }

    .sort-panel select {
        padding: 5px;
        font-size: 14px;
    }

/* Сетка карточек */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Карточка картины */
.painting-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

    .painting-card:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

.painting-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    cursor: pointer;
}

.card-info {
    padding: 10px;
    flex: 1;
}

.painting-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
}

.painting-tech,
.painting-size,
.painting-price {
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

.painting-price {
    font-weight: 600;
    color: #222;
}

/* Кнопки внизу карточки */
.card-buttons {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-top: 1px solid #eee;
}

    .card-buttons button {
        padding: 8px 10px;
        font-size: 14px;
        cursor: pointer;
        border: none;
        border-radius: 4px;
        transition: background-color 0.2s;
    }

.cart-btn {
    background-color: rgba(0, 123, 255, 0.7);
    color: #fff;
    width: 140px;
}

    .cart-btn:hover {
        background-color: rgba(0, 123, 255, 1);
    }

.fav-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .fav-btn span {
        font-size: 20px;
    }
.toggle-filters-btn {
    display: none; /* По умолчанию скрыта, отображается только в мобильной версии */
    background-color: rgba(0, 123, 255, 0.7);
    color: #fff;
    border: none;
    padding: 12px 25px;
    margin-bottom: 20px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

    .toggle-filters-btn:hover {
        background-color: rgba(0, 123, 255, 1);
        transform: scale(1.05);
    }
/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        position: relative;
    }
    /* Панель фильтров выезжает слева как меню */
    .filters-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background-color: #fafafa;
        border-right: 1px solid #eee;
        padding: 20px;
        box-shadow: 2px 0 8px rgba(0,0,0,0.2);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1100;
    }

        .filters-panel.active {
            transform: translateX(0);
        }

    .toggle-filters-btn {
        display: block;
    }
    /* Сетка карточек: две колонки */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
