/* Стили для каталога */
.catalog-h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.836);
    padding: 0 20px;
}

.catalog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.catalog-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center; /* Добавлено для центрирования */
    
    /* Адаптивная сетка по умолчанию - 1 колонка */
    grid-template-columns: repeat(auto-fit, minmax(280px, 300px));
}

/* Для больших экранов ограничиваем 4 колонками */
@media (min-width: 1280px) {
    .catalog-grid {
        grid-template-columns: repeat(4, 280px);
    }
}

/* Для средних экранов 3 колонки */
@media (min-width: 1024px) and (max-width: 1279px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 280px);
    }
}

/* Для планшетов 2 колонки */
@media (min-width: 768px) and (max-width: 1023px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 280px);
    }
}

/* Для мобильных 1 колонка */
@media (max-width: 767px) {
    .catalog-grid {
        grid-template-columns: minmax(280px, 1fr);
    }
}

.product-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
    overflow: hidden; /* Добавлено для согласованности */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    margin-bottom: 1rem;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.out-of-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f56565;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.product-info {
    padding: 0; /* Убрано, так как padding уже в .product-card */
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
    line-height: 1.4;
}

.product-description {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.product-price {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #424242;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.in-stock {
    color: #48bb78;
    font-weight: 600;
}

.out-of-stock {
    color: #f56565;
}

.no-products {
    text-align: center;
    padding: 3rem;
    color: #718096;
    grid-column: 1 / -1;
}

/* Стили для кнопки быстрого просмотра */
.quick-view-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff5100 0%, #ff0000 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.quick-view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.quick-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.quick-view-btn:hover::before {
    left: 100%;
}

.quick-view-btn:active {
    transform: translateY(0);
}

.quick-view-icon {
    font-size: 1rem;
}

/* Для товаров, которых нет в наличии */
.product-card:has(.out-of-stock) .quick-view-btn {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.product-card:has(.out-of-stock) .quick-view-btn:hover {
    transform: none;
    box-shadow: none;
}

.product-card:has(.out-of-stock) .quick-view-btn::before {
    display: none;
}