/* ============================================ */
/* CATALOGUE PRODUCT CARD - ИСПРАВЛЕННЫЕ СТИЛИ */
/* ============================================ */

/* ----- Основной контейнер карточки ----- */
.product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    position: relative;
    font-family: 'Inter', 'Arial', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    /* Фиксированная высота для one-size */
    min-height: 580px;
}

    .product-card:hover {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        transform: translateY(-4px);
        border-color: #f54900;
    }

/* ----- Бейджи (скидка, новинка, хит) ----- */
.product-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Фиксированная высота для консистентности */
    min-height: 0;
}

.product-card__badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.product-card__badge--discount {
    background: #ff4d4f;
    color: white;
    box-shadow: 0 2px 4px rgba(255, 77, 79, 0.3);
}

.product-card__badge--new {
    background: #52c41a;
    color: white;
    box-shadow: 0 2px 4px rgba(82, 196, 26, 0.3);
}

.product-card__badge--hit {
    background: #faad14;
    color: white;
    box-shadow: 0 2px 4px rgba(250, 173, 20, 0.3);
}

/* ----- Кнопка избранного ----- */
.product-card__favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    z-index: 2;
    color: #ccc;
    font-size: 18px;
}

    .product-card__favorite:hover {
        transform: scale(1.1);
        background: #fff1f0;
        color: #ff4d4f;
    }

    .product-card__favorite.active {
        color: #ff4d4f;
        background: #fff1f0;
    }

/* ----- Изображение товара ----- */
.product-card__image {
    width: 100%;
    height: 200px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    /* Фиксированная высота */
    flex-shrink: 0;
}

    .product-card__image a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .product-card__image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transition: transform 0.3s ease;
    }

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

/* ----- Информация о товаре ----- */
.product-card__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    /* Важно для растягивания */
    min-height: 0;
}

/* Название товара */
.product-card__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    /* Фиксированная высота для 2 строк */
    min-height: 44px;
    max-height: 44px;
}

    .product-card__title:hover {
        color: #f54900;
    }

/* Мета-информация */
.product-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: #888;
    /* Фиксированная высота */
    min-height: 28px;
}

    .product-card__meta span {
        background: #f0f4f8;
        padding: 4px 8px;
        border-radius: 6px;
        white-space: nowrap;
    }

/* ----- Цены ----- */
.product-card__prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0;
    /* Фиксированная высота */
    min-height: 32px;
}

.product-card__price-main {
    font-size: 22px;
    font-weight: 700;
    color: #f54900;
}

.product-card__price-old {
    font-size: 14px;
    color: #aaa;
    text-decoration: line-through;
}

.product-card__price-unit {
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

/* Информация о ценах */
.product-card__various-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    min-height: 96px;
}

/* Минимальный заказ */
.product-card__min-order {
    font-size: 14px;
    color: #888;
    background: #fdf0d5;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
    /* Фиксированная высота */
    min-height: 28px;
}

/* Оптовые цены */
.product-card__wholesale {
    background: #f6ffed;
    border-radius: 20px;
    padding: 6px 10px;
    margin-top: 8px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Фиксированная высота */
    min-height: 32px;
}

.wholesale-label {
    color: #666;
}

.wholesale-price {
    color: #52c41a;
    font-weight: 700;
}

/* ----- Наличие ----- */
.product-card__availability {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    /* Фиксированная высота */
    min-height: 28px;
}

.in-stock {
    color: #2e7d32;
    background: #e8f5e9;
    padding: 6px 10px;
    border-radius: 20px;
    display: inline-block;
    align-content: center;
}

.out-of-stock {
    color: #d32f2f;
    background: #ffebee;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    align-content: center;
}

/* ----- Доставка ----- */
.product-card__delivery {
    margin-top: 8px;
    font-size: 14px;
    color: #1565c0;
    background: #e3f2fd;
    padding: 6px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    /* Фиксированная высота */
    min-height: 32px;
}

.delivery-icon {
    font-size: 14px;
}

/* ----- Поставщик ----- */
.product-card__supplier {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    /* Фиксированная высота */
    min-height: 40px;
}

.supplier-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.supplier-info2 {
    display: grid;
    gap: 8px;
    font-size: 14px;
}

.supplier-name {
    font-weight: 600;
    color: #333;
}

.supplier-rating {
    color: #faad14;
    font-weight: 600;
}

.supplier-verified {
    font-size: 11px;
    color: #52c41a;
    background: #f6ffed;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ----- Рейтинг товара ----- */
.product-card__rating {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    /* Фиксированная высота */
    min-height: 24px;
}

    .product-card__rating .stars {
        color: #faad14;
        letter-spacing: 2px;
        font-size: 14px;
    }

.rating-value {
    font-weight: 700;
    color: #333;
}

.reviews-count {
    color: #aaa;
    font-size: 12px;
}

/* ===== SPACER - РАСТАЛКИВАЕТ КОНТЕНТ И ПРИЖИМАЕТ КНОПКИ К НИЗУ ===== */
.product-card__spacer {
    flex: 1;
    min-height: 0;
}

/* ===== КНОПКИ ДЕЙСТВИЙ ===== */
.product-card__actions {
    display: flex;
    gap: 12px;
    margin-top: auto; /* Прижимаем к низу */
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* Кнопка "В корзину" */
.btn-cart {
    flex: 2;
    background: linear-gradient(135deg, #f54900 0%, #d43f00 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(245, 73, 0, 0.3);
}

    .btn-cart:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(245, 73, 0, 0.4);
        background: linear-gradient(135deg, #d43f00 0%, #b83600 100%);
    }

    .btn-cart:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-cart:disabled {
        background: #ccc;
        cursor: not-allowed;
        box-shadow: none;
        transform: none;
    }

    .btn-cart .cart-icon {
        font-size: 16px;
    }

/* Кнопка "Быстрый заказ" */
.btn-quick {
    flex: 1;
    background: transparent;
    color: #f54900;
    border: 2px solid #f54900;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

    .btn-quick:hover:not(:disabled) {
        background: rgba(245, 73, 0, 0.08);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(245, 73, 0, 0.2);
    }

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

    .btn-quick:disabled {
        border-color: #ccc;
        color: #ccc;
        cursor: not-allowed;
        transform: none;
    }

.quick-icon {
    font-size: 14px;
}

/* ----- Пустое состояние ----- */
.empty-products {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-products h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
}

.empty-products p {
    color: #888;
    margin-bottom: 24px;
}

.btn-reset {
    display: inline-block;
    background: #f54900;
    color: white;
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

    .btn-reset:hover {
        background: #d43f00;
        transform: translateY(-2px);
    }

/* ===== АДАПТИВНОСТЬ ===== */
@media (min-width: 1921px) {
    .product-card {
        min-height: 600px;
        padding: 20px;
    }

    .product-card__image {
        height: 220px;
    }

    .product-card__title {
        font-size: 17px;
        min-height: 48px;
        max-height: 48px;
    }

    .product-card__price-main {
        font-size: 24px;
    }
}

@media (min-width: 1600px) and (max-width: 1920px) {
    .product-card {
        min-height: 580px;
        padding: 18px;
    }

    .product-card__image {
        height: 200px;
    }

    .product-card__title {
        font-size: 16px;
    }

    .product-card__price-main {
        font-size: 22px;
    }
}

@media (min-width: 1366px) and (max-width: 1599px) {
    .product-card {
        min-height: 560px;
        padding: 16px;
    }

    .product-card__image {
        height: 180px;
    }

    .product-card__title {
        font-size: 15px;
        min-height: 42px;
        max-height: 42px;
    }

    .product-card__price-main {
        font-size: 20px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .product-card {
        min-height: 540px;
        padding: 14px;
    }

    .product-card__image {
        height: 170px;
    }

    .product-card__title {
        font-size: 14px;
        min-height: 40px;
        max-height: 40px;
    }

    .product-card__price-main {
        font-size: 18px;
    }

    .btn-cart, .btn-quick {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .product-card {
        min-height: 440px;
        padding: 10px;
        border-radius: 12px;
    }

    .product-card__image {
        height: 130px;
        margin-bottom: 10px;
    }

    .product-card__title {
        font-size: 13px;
        min-height: 36px;
        max-height: 36px;
    }

    .product-card__price-main {
        font-size: 16px;
    }

    .product-card__price-old {
        font-size: 12px;
    }

    .product-card__badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .btn-cart, .btn-quick {
        padding: 8px 10px;
        font-size: 12px;
        border-radius: 8px;
    }
}

@media (max-width: 360px) {
    .product-card {
        min-height: 400px;
        padding: 8px;
    }

    .product-card__image {
        height: 110px;
    }

    .product-card__title {
        font-size: 12px;
        min-height: 32px;
        max-height: 32px;
    }

    .product-card__price-main {
        font-size: 15px;
    }

    .product-card__favorite {
        width: 26px;
        height: 26px;
        font-size: 12px;
        top: 8px;
        right: 8px;
    }
    .supplier-logo-img {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        object-fit: cover;
        flex-shrink: 0;
    }

    .supplier-logo-placeholder {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: #f0f0f0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex-shrink: 0;
    }
}
