/* Новые стили для компактного каталога */
:root {
    --card-padding: 15px;
    --card-radius: 12px;
    --image-height: 200px;
}

.main-content {
    padding: 100px 5% 40px;
}

.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0;
    background: var(--darker-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.filter-btn {
    background: linear-gradient(145deg, var(--secondary-color), #6b3300);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.4);
}

.sort-select {
    background: var(--card-bg);
    border: 2px solid var(--secondary-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.3);
}

/* Компактная сетка товаров */
.products-grid.catalog-style {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 0;
    margin: 0 0 50px 0;
}

/* Компактные карточки */
.product-card.catalog-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card.catalog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Уменьшаем контейнер изображения */
.product-image-container {
    position: relative;
    height: var(--image-height);
    overflow: hidden;
    flex-shrink: 0;
}

.product-image-main,
.product-image-hover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

/* Бейджи - делаем меньше */
.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.product-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.7);
}

.badge-new {
    background: rgba(196, 30, 58, 0.9);
    color: white;
}

.badge-sale {
    background: rgba(212, 175, 55, 0.9);
    color: var(--dark-bg);
}

/* Кнопка избранного - компактнее */
.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.favorite-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.favorite-btn i {
    font-size: 16px;
}

/* Кнопка предпросмотра - компактнее */
.preview-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-card:hover .preview-btn {
    opacity: 1;
    transform: translateY(-3px);
}

.preview-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px) scale(1.1);
}

.preview-btn i {
    font-size: 14px;
}

/* Информация о товаре - компактнее */
.product-info {
    padding: var(--card-padding);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    margin-bottom: 8px;
    font-size: 18px;
    color: var(--gold-color);
    line-height: 1.3;
    font-weight: 600;
}

.product-desc {
    margin-bottom: 12px;
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 700;
}

.old-price {
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
}

/* Кнопки действий - компактнее */
.product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-cart {
    flex: 1;
    background: linear-gradient(145deg, var(--secondary-color), #6b3300);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
}

.btn-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

.btn-buy {
    background: linear-gradient(145deg, var(--accent-color), #a00);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4);
}

/* Пагинация - стилизируем красивее */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 20px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--secondary-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination-btn i {
    font-size: 14px;
}

/* Заголовок каталога */
.catalog-header {
    text-align: center;
    margin-bottom: 40px;
}

.catalog-title {
    font-size: 36px;
    color: var(--gold-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.catalog-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
}

.catalog-subtitle {
    color: #ccc;
    font-size: 18px;
    margin-top: 25px;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card.catalog-card {
    animation: fadeInUp 0.6s ease;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .products-grid.catalog-style {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 80px 4% 30px;
    }
    
    .catalog-controls {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .products-grid.catalog-style {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .catalog-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .products-grid.catalog-style {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-image-container {
        height: 160px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-info h3 {
        font-size: 16px;
    }
    
    .product-desc {
        font-size: 13px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* Эффект градиента на изображениях */
.product-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    pointer-events: none;
}

/* Счетчик товаров */
.products-count {
    color: #888;
    font-size: 14px;
    margin-left: auto;
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 6px;
    border: 1px solid rgba(139, 69, 19, 0.3);
}
/* Стили для уведомлений и загрузки */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-left: 4px solid #2E7D32;
}

.notification.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-left: 4px solid #b71c1c;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Стили для индикатора загрузки */
.quick-buy-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    backdrop-filter: blur(5px);
}

.loader-overlay {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(139, 69, 19, 0.3);
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(139, 69, 19, 0.3);
    border-top: 4px solid var(--gold-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-content p {
    color: var(--text-color);
    font-size: 16px;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}