/* ====== Стили каталога Холст и Масло ====== */

.catalog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Open Sans', Arial, sans-serif;
    color: #000;
}

.catalog-title {
    font-size: 36px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 1px;
}

/* ====== Панель фильтров ====== */
.filters-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f8f8;
    border-radius: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 160px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
}

.filter-select,
.price-input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:hover,
.price-input:hover {
    border-color: #999;
}

.filter-select:focus,
.price-input:focus {
    outline: none;
    border-color: #000;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input {
    width: 100px;
    text-align: center;
}

.price-sep {
    color: #999;
    font-size: 14px;
}

.btn-filter,
.btn-reset {
    padding: 12px 28px;
    border: 1px solid #787978;
    border-radius: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-filter {
    background: #787978;
    color: #fff;
}

.btn-filter:hover {
    background: #000;
    border-color: #000;
}

.btn-reset {
    background: #fff;
    color: #000;
}

.btn-reset:hover {
    background: #f0f0f0;
}

/* ====== Статус загрузки ====== */
.loading-status {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====== Счётчик ====== */
.products-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    text-align: right;
}

/* ====== Сетка товаров ====== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .filters-panel {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group {
        min-width: auto;
    }
    .catalog-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== Карточка товара ====== */
.product-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.product-image-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 110%;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.badge-instock {
    background: #000;
    color: #fff;
}

.badge-order {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

.product-info {
    padding: 18px;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-author {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 400;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

.product-price-old {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-sku {
    font-size: 11px;
    color: #aaa;
    font-weight: 300;
}

/* ====== Пагинация ====== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #000;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: #000;
}

.page-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ====== Сообщения ====== */
.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    grid-column: 1 / -1;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #c00;
    background: #fff5f5;
    border-radius: 15px;
    grid-column: 1 / -1;
}
