/* Product Card Styles */

/* Product Card */
.product-card {
    background-color: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* Соотношение 3:4 (высота/ширина = 4/3 = 1.333) */
    overflow: hidden;
    background-color: #f8f8f8;
}

.product-image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
    cursor: pointer;
    z-index: 0;
}

.product-images-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image.active {
    opacity: 1;
}

.product-image-main,
.product-image-low {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.product-image-main {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image-main.loaded {
    opacity: 1;
}

.product-image-low {
    filter: blur(5px);
    transform: scale(1.1);
    z-index: 1;
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.product-image-placeholder svg {
    width: 50%;
    height: 50%;
    opacity: 0.3;
}

/* Image Navigation */
.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.2s;
    padding: 0;
}

.product-card:hover .image-nav-btn {
    display: flex;
}

.image-nav-btn:hover {
    opacity: 0.5;
}

.image-nav-prev {
    left: 10px;
}

.image-nav-next {
    right: 10px;
}

.image-nav-icon {
    width: 13px;
    height: 35px;
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.image-nav-prev .image-nav-icon {
    transform: scaleX(-1);
}

/* Image Indicators */
.image-indicators {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
    padding: 0 15px;
}

.image-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #DDDDDD;
    cursor: pointer;
    transition: background-color 0.2s;
}

.image-dot.active {
    background-color: #000000;
}

/* In Cart Icon */
.product-in-cart {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.in-cart-icon {
    filter: brightness(0) invert(1);
}

/* Wishlist Button */
.product-wishlist {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 0;
}

.product-card:hover .product-wishlist {
    opacity: 1;
}

/* Активное сердечко всегда видимо */
.product-wishlist.active {
    opacity: 1;
}

.product-wishlist.active .wishlist-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(100%) saturate(7500%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

/* Product Info Container */
.product-info-container {
    position: relative;
    height: 135px;
}

/* Product Info (DEFAULT state) */
.product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    transition: opacity 0.2s;
}

.product-name {
    font-family: 'AGOpt Cyrillic', 'Sansation', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #000;
}

.product-price {
    font-size: 0.75rem;
    margin-top: 15px;
    color: #000;
}

.product-colors-count {
    color: #AAAAAA;
    font-size: 0.7rem;
    margin-bottom: 5px;
}

/* Hover Info (ON HOVER state) */
.product-hover-info {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    pointer-events: none;
}

.product-card:hover .product-hover-info {
    opacity: 1;
    pointer-events: auto;
}

.product-card:hover .product-info {
    opacity: 0;
}

.product-sizes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    justify-content: center;
}

.size-link {
    padding: 0;
    background: none;
    color: #000000;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.size-link:hover {
    color: #000000;
}

.size-link.unavailable {
    color: #AAAAAA;
    pointer-events: none;
    cursor: default;
}

.product-group-colors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.color-link {
    width: 15px;
    height: 15px;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    display: block;
    flex-shrink: 0;
    box-shadow: 1px 1px 0px rgba(0,0,0,0.2);
}

.color-link.active {
    width: 24px;
    height: 24px;
    border: 1px solid #fff;
}

.color-link:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .image-nav-btn {
        display: none;
    }
    
    .product-hover-info {
        display: none !important;
    }
    
    .product-card:hover .product-info {
        opacity: 1;
    }
    
    .product-wishlist {
        opacity: 1;
    }
}

/* Отключаем hover эффекты на мобильных устройствах */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover .product-hover-info {
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .product-card:hover .product-info {
        opacity: 1 !important;
    }
    
    .product-card:hover .product-wishlist {
        opacity: 1;
    }
    
    .product-card:hover .image-nav-btn {
        display: none !important;
    }
    
    .product-hover-info {
        display: none !important;
    }
}

/* Дополнительная защита для мобильных устройств */
@media (max-width: 768px) {
    .product-card:hover .product-hover-info {
        opacity: 0 !important;
        pointer-events: none !important;
        display: none !important;
    }
    
    .product-card:hover .product-info {
        opacity: 1 !important;
    }
    
    .product-hover-info {
        display: none !important;
    }
}

/* Дополнительная защита через класс для мобильных устройств */
.is-mobile-device .product-card:hover .product-hover-info,
.is-mobile-device .product-hover-info {
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}

.is-mobile-device .product-card:hover .product-info {
    opacity: 1 !important;
}
