﻿/**
 * PRODUCT CARD COMPONENT SYSTEM
 * Complete styling for e-commerce product cards including:
 * - Card layout & structure
 * - Badge system (Sale, New, Wishlist, etc.)
 * - Animations & transitions
 * - Responsive design
 * - Accessibility features
 * 
 * Version: 1.0
 * Last Updated: 2025
 * QCMS Team
 */


/* ============================================
   PRODUCT CARD BASE STYLES
   ============================================ */

.product-card {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    /*border-radius: 8px;*/
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

    .product-card:hover {
        /*transform: translateY(-5px);*/
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    }

.product-card__image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #f8f9fa;
}

.product-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.05);
}

.product-card__body {
    padding: 1rem;
}

.product-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

    .product-card__title a {
        color: inherit;
        text-decoration: none;
    }

        .product-card__title a:hover {
            color: #0d6efd;
        }

.product-card__price {
    margin-bottom: 0.75rem;
}

.product-card__price--old {
    text-decoration: line-through;
    color: #6c757d;
    margin-right: 0.5rem;
}

.product-card__price--sale {
    color: #dc3545;
    font-weight: 700;
    font-size: 1.1rem;
}

.product-card__price--regular {
    font-weight: 700;
    font-size: 1.1rem;
    color: #212529;
}

.product-card__price--contact,
.product-card__price--from,
.product-card__price--range,
.product-card__price--variable {
    color: #0d6efd;
    font-weight: 600;
}

/* ============================================
   BADGE CONTAINER SYSTEM
   ============================================ */

.product-card__badge-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through to image */
}

/* Re-enable pointer events on badges */
.product-card__badge-container > * {
    pointer-events: auto;
}

/* ============================================
   BADGE STYLES
   Moved to product-badges.css (centralized)
   ============================================ */

/* Card-specific badge container positioning */
.product-card__badge-container {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

/* ============================================
   WISHLIST COUNT BADGE (in navigation)
   ============================================ */

.wishlist-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    font-size: 0.75rem;
    line-height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #dc3545;
    color: white;
    font-weight: 700;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 576px) {
    .product-card__badge-container {
        gap: 6px;
        top: 8px;
        left: 8px;
        right: 8px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .product-card__badge-container {
        position: static;
        display: inline-flex;
        gap: 4px;
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   LEGACY SUPPORT (deprecated - remove in v2.0)
   ============================================ */

/* Old class names for backward compatibility */
.btn-wishlist {
    /* Deprecated: Use .product-badge--wishlist instead */
    background: transparent;
    border: none;
    border-radius: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    z-index: 10;
}

.btn-wishlist:hover {
    background: transparent;
    border: none;
    box-shadow: none;
    transform: scale(1.1);
}

.btn-wishlist i {
    font-size: 1.25rem;
    color: #fff;
    transition: all 0.3s ease;
}

.btn-wishlist.active i {
    animation: heartBeat 0.3s ease;
}

.btn-wishlist:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
