﻿/* Стили для карточки товара */
.product-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 390px; /* увеличили с 370px до 390px */
    position: relative;
    overflow: hidden;
}

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

/* Контейнер для фото товара - УВЕЛИЧИВАЕМ */
.product-image-container {
    width: 100%;
    height: 200px; /* увеличили с 180px до 200px */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 4px 0; /* уменьшили нижний отступ */
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 6px; /* немного уменьшили внутренние отступы */
    background: #fafafa;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

/* Заглушка для отсутствующих изображений */
.product-image-container::before {
    content: 'Нет фото';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.product-image-container:has(img[src*="placeholder"]),
.product-image-container:has(img:not([src])) {
    background: #f8f8f8;
}

    .product-image-container:has(img[src*="placeholder"])::before,
    .product-image-container:has(img:not([src]))::before {
        display: block;
    }

/* Артикул товара - ВОЗВРАЩАЕМ ПЕРВОНАЧАЛЬНЫЙ СТИЛЬ */
.product-sku {
    font-size: 12px;
    color: #999;   
    font-weight: 500;
}

/* Название товара - корректируем высоту */
.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.2;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Информация о наличии - ВОЗВРАЩАЕМ ПЕРВОНАЧАЛЬНЫЙ СТИЛЬ */
.product-stock {
    font-size: 14px;
    color: #28a745;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Рейтинг - ВОЗВРАЩАЕМ ПЕРВОНАЧАЛЬНЫЙ СТИЛЬ */
.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.rating-stars {
    color: #ffc107;
    margin-right: 5px;
}

.rating-count {
    font-size: 12px;
    color: #666;
}

/* Блок с ценой и кнопкой - ВОЗВРАЩАЕМ ПЕРВОНАЧАЛЬНЫЙ СТИЛЬ */
.product-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.price-value {
    font-size: 20px;
    font-weight: bold;
    color: #cc0000;
}

.price-currency {
    font-size: 14px;
    color: #666;
    margin-top: 2px;
}

/* Вариант 1: Простая иконка корзины */
.add-to-cart-btn {
    background: #cc0000;
    border: none;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

    .add-to-cart-btn:hover {
        background: #990000;
        transform: scale(1.05);
    }

    .add-to-cart-btn svg {
        width: 24px;
        height: 24px;
        stroke: white;
        stroke-width: 2;
        fill: none;
    }
