/**
 * Product Card Styles
 * Стили для карточек оборудования по образцу medeq.ru
 * 
 * @package MedEquip_Aggregator
 * @version 1.3.0
 */

/* ==========================================================================
   Product Card Base
   ========================================================================== */

.product-card {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.product-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
}

/* ==========================================================================
   Article
   ========================================================================== */

.product-card__article {
    font-size: 12px;
    color: #999999;
    margin-bottom: 12px;
}

/* ==========================================================================
   Image Gallery
   ========================================================================== */

.product-card__link {
    text-decoration: none;
    color: inherit;
}

.product-card__img {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.image-swiper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-swiper .swiper-wrapper {
    height: 100%;
}

.image-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
}

.swiper-slide-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Swiper Pagination */
.image-swiper .swiper-pagination {
    bottom: 12px;
    z-index: 10;
}

.image-swiper .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background-color: #cccccc;
    opacity: 1;
    transition: all 0.3s ease;
}

.image-swiper .swiper-pagination-bullet-active {
    width: 20px;
    border-radius: 3px;
    background-color: #12356a;
}

/* ==========================================================================
   Hover Sectors
   ========================================================================== */

.swiper-hover-sectors {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 5;
    pointer-events: none;
}

.swiper-hover-sector {
    flex: 1;
    pointer-events: all;
    cursor: pointer;
}

/* ==========================================================================
   Labels
   ========================================================================== */

.product-card__labels {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.product-card__label {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    background-color: #ffffff;
    color: #222222;
    white-space: nowrap;
}

.product-card__label--green {
    background-color: #4CAF50;
    color: #ffffff;
}

.product-card__label--orange {
    background-color: #FF9800;
    color: #ffffff;
}

.product-card__label--blue {
    background-color: #2196F3;
    color: #ffffff;
}

/* ==========================================================================
   Remove Button
   ========================================================================== */

.product-card__remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-card__remove:hover {
    background-color: #ff4444;
    transform: scale(1.1);
}

.product-card__remove:hover svg path {
    stroke: #ffffff;
}

.product-card__remove svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Title
   ========================================================================== */

.product-card__title {
    margin-bottom: 8px;
}

.product-card__title p {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #222222;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.product-card:hover .product-card__title p {
    color: #12356a;
}

/* ==========================================================================
   Description
   ========================================================================== */

.product-card__description {
    margin-bottom: 12px;
}

.product-card__subtitle {
    font-size: 14px;
    color: #666666;
    line-height: 1.4;
}

/* ==========================================================================
   Reviews
   ========================================================================== */

.product-card__reviews {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

/* Rating */
.rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating__star {
    display: inline-flex;
    line-height: 1;
}

.rating__star svg {
    width: 14px;
    height: 13px;
}

.rating__count {
    font-size: 13px;
    color: #666666;
    margin-left: 4px;
}

/* Comments */
.comments__wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.comments__icon {
    display: inline-flex;
    line-height: 1;
}

.comments__icon svg {
    width: 14px;
    height: 14px;
}

.comments__count {
    font-size: 13px;
    color: #666666;
}

/* ==========================================================================
   Price
   ========================================================================== */

.product-card-price {
    margin-bottom: 16px;
}

.product-card-price__request {
    font-size: 20px;
    font-weight: 700;
    color: #222222;
}

.product-card-price__base {
    font-size: 16px;
    color: #999999;
    text-decoration: line-through;
    margin-top: 4px;
}

.product-card-price__sale {
    font-size: 20px;
    font-weight: 700;
    color: #FF5722;
    margin-bottom: 4px;
}

/* ==========================================================================
   Controls
   ========================================================================== */

.product-card-controls {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-card-controls__add {
    flex: 1;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn--blue {
    background-color: #12356a;
    color: #ffffff;
}

.btn--blue:hover {
    opacity: .8;
}

.product-card-controls__icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   Favorites Icon
   ========================================================================== */

.fav {
    cursor: pointer;
    transition: all 0.3s ease;
}

.fav:hover {
    transform: scale(1.1);
}

.fav--checked path {
    fill: #222222;
}

.fav:hover path {
    stroke: #12356a;
}

.fav--checked:hover path {
    fill: #12356a;
}

/* ==========================================================================
   Comparison Icon
   ========================================================================== */

.compare {
    cursor: pointer;
    transition: all 0.3s ease;
}

.compare:hover {
    transform: scale(1.1);
}

.compare .check {
    opacity: 0;
}

.compare--remove .check {
    opacity: 1;
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.favorites__cards,
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    .favorites__cards,
    .equipment-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .favorites__cards,
    .equipment-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .product-card__inner {
        padding: 12px;
    }
    
    .product-card__title p {
        font-size: 15px;
    }
    
    .product-card-price__request,
    .product-card-price__sale {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .favorites__cards,
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card__reviews {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

