﻿/* ========================================
       PRODUCT CARD V1 - Standalone Styles
       Matching carousel-product-card design
       ======================================== */

.product-card-v1 {
    background: var(--color-white, #fff);
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.08));
    transition: all var(--transition-base, 0.3s ease);
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .product-card-v1:hover {
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    }

/* ========================================
       Images Container
       ======================================== */

.product-card-v1__images {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--color-light-gray, #f8f9fa);
}

    .product-card-v1__images a {
        display: block;
        position: relative;
        width: 100%;
        height: 100%;
    }

.product-card-v1__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity var(--transition-base, 0.3s ease);
}

.product-card-v1__image--primary {
    opacity: 1;
}

.product-card-v1__image--secondary {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

/* Hover effect - show secondary image */
.product-card-v1:hover .product-card-v1__image--primary {
    opacity: 0;
}

.product-card-v1:hover .product-card-v1__image--secondary {
    opacity: 1;
}

/* ============================================
   QUICK ACTIONS (Wishlist, Compare buttons)
   ============================================ */

.quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto; /* Push to the right side of the flex container */
}

/* ========================================
       Badges
======================================== */

.product-card-v1__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Badge and wishlist styles moved to product-badges.css (centralized) */

/* ========================================
       Product Info
       ======================================== */

.product-card-v1__info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-v1__title {
    font-size: var(--font-size-base, 0.95rem);
    font-weight: var(--font-weight-semibold, 600);
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

    .product-card-v1__title a {
        color: var(--color-text-dark, #212529);
        text-decoration: none;
        transition: color var(--transition-base, 0.3s ease);
    }

        .product-card-v1__title a:hover {
            color: var(--color-accent, #dc3545);
        }

.product-card-v1__variations {
    font-size: var(--font-size-xs, 0.8rem);
    color: var(--color-text-muted, #6c757d);
    margin: 0;
}

/* ========================================
       Price Display
       ======================================== */

.product-card-v1__price {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

    .product-card-v1__price .price-current {
        font-size: var(--font-size-lg, 1.25rem);
        font-weight: var(--font-weight-bold, 700);
        color: var(--color-text-dark, #212529);
    }

    .product-card-v1__price .price-sale {
        color: var(--color-danger, #dc3545);
    }

    .product-card-v1__price .price-old {
        font-size: var(--font-size-sm, 0.875rem);
        color: var(--color-text-muted, #6c757d);
        text-decoration: line-through;
    }

    .product-card-v1__price .price-range {
        font-size: var(--font-size-base, 1rem);
        font-weight: var(--font-weight-semibold, 600);
        color: var(--color-text-dark, #212529);
    }

    .product-card-v1__price .price-contact {
        font-size: var(--font-size-sm, 0.875rem);
        font-weight: var(--font-weight-medium, 500);
        color: var(--color-accent, #6c757d);
    }

/* ========================================
       Skeleton Loading State
       ======================================== */

.product-card-v1.skeleton-loading {
    animation: skeleton-fade 1.5s ease-in-out infinite;
}

    .product-card-v1.skeleton-loading .product-card-v1__images {
        background: linear-gradient( 90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75% );
        background-size: 200% 100%;
        animation: skeleton-shimmer 1.5s ease-in-out infinite;
    }

    .product-card-v1.skeleton-loading .skeleton-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient( 90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75% );
        background-size: 200% 100%;
        animation: skeleton-shimmer 1.5s ease-in-out infinite;
    }

    .product-card-v1.skeleton-loading .skeleton-title,
    .product-card-v1.skeleton-loading .skeleton-text,
    .product-card-v1.skeleton-loading .skeleton-price {
        background: linear-gradient( 90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75% );
        background-size: 200% 100%;
        animation: skeleton-shimmer 1.5s ease-in-out infinite;
        border-radius: 4px;
    }

    .product-card-v1.skeleton-loading .skeleton-title {
        height: 20px;
        width: 90%;
        margin-bottom: 8px;
    }

    .product-card-v1.skeleton-loading .skeleton-text {
        height: 14px;
        width: 60%;
        margin-bottom: 12px;
    }

    .product-card-v1.skeleton-loading .skeleton-price {
        height: 24px;
        width: 50%;
    }

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes skeleton-fade {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ========================================
       Responsive Adjustments
       ======================================== */

@media (max-width: 576px) {
    .product-card-v1__images {
        aspect-ratio: 1 / 1;
    }
}
