/* Стили для страницы каталога товаров */

.products-page {
    display: flex;
    gap: 30px;
    margin-top: 35px;
    margin-bottom: 70px;
}

/* Фильтры */
.products-filters {
    width: 280px;
    flex-shrink: 0;
    background: #f8f8f8;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.products-filters h3 {
    font-family: Montserrat, sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #222;
}

.products-filters h3.filter-section-title {
    font-size: 16px;
    margin-top: 24px;
    margin-bottom: 12px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #222;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #A8A8A8;
    border-radius: 4px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    background: #fff;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #00ccff;
}

.filter-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-reset-btn {
    width: 100%;
    padding: 12px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.filter-reset-btn:hover {
    background: #333;
}

/* Основной контент */
.products-content {
    flex: 1;
    min-width: 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.products-count {
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    color: #666;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-sort label {
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    color: #222;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #A8A8A8;
    border-radius: 4px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #00ccff;
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    border: 1px solid #A8A8A8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-out-of-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 0, 0, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.product-card-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-name {
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #222;
    line-height: 1.4;
}

.product-card-category {
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.product-card-specs {
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    color: #555;
    margin-bottom: 15px;
    flex: 1;
}

.product-card-specs div {
    margin-bottom: 4px;
}

.product-card-price {
    font-family: Montserrat, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin-top: auto;
}

.product-card-add-btn {
    width: 100%;
    padding: 12px;
    background: #222;
    color: #fff;
    border: none;
    border-top: 1px solid #A8A8A8;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.product-card-add-btn:hover:not(:disabled) {
    background: #333;
}

.product-card-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-family: Montserrat, sans-serif;
    font-size: 18px;
    color: #666;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 15px;
    border: 1px solid #A8A8A8;
    background: #fff;
    color: #222;
    border-radius: 4px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
    background: #222;
    color: #fff;
    border-color: #222;
}

.pagination-btn.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-dots {
    padding: 10px 5px;
    color: #666;
}

/* Уведомление */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #222;
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Иконка корзины в header */
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    font-family: Montserrat, sans-serif;
}

.services-heading__title {
    color: #555;
}

/* Адаптивность */
@media (max-width: 991px) {
    .products-page {
        flex-direction: column;
    }

    .products-filters {
        width: 100%;
        position: static;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-card-image {
        height: 160px;
    }
}

@media (max-width: 479px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        gap: 5px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 35px;
    }
}