/**
 * Product Card Premium V2 - Lin Teas
 * Phase 5: Cards produits premium - Copie 1:1 du mockup catalogue-premium.html
 *
 * @package LinTeas
 * @since 2.0.0
 */

/* ==========================================================================
   STRUCTURE DE BASE
   ========================================================================== */

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card.featured {
    border: 2px solid var(--color-accent);
}

.product-card.new::before {
    content: 'Nouveau';
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--color-accent);
    color: var(--color-white);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 3;
}

/* ==========================================================================
   IMAGE ET OVERLAY
   ========================================================================== */

.card-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

/* ==========================================================================
   BADGES D'EXCLUSIVITÉ
   ========================================================================== */

.card-badges {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    z-index: 2;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-white);
    backdrop-filter: blur(10px);
}

/* Badges selon le Module Tags Exclusivités développé */
.badge-bio {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
}

.badge-premium {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    color: var(--color-white);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.badge-site {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.badge-boutique {
    background: linear-gradient(135deg, #DC143C, #FF6B6B);
}

.badge-new {
    background: linear-gradient(135deg, #FF6F00, #FFB300);
    color: var(--color-white);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
}

.badge-limited {
    background: linear-gradient(135deg, #7B1FA2, #9C27B0);
    color: var(--color-white);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.badge-traditional {
    background: linear-gradient(135deg, #5D4037, #8D6E63);
    color: var(--color-white);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.badge-bestseller {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    color: var(--color-white);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
}

/* ==========================================================================
   ACTIONS RAPIDES (HOVER)
   ========================================================================== */

.card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.product-card:hover .card-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-text-light);
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
}

/* ==========================================================================
   OVERLAY VERT "AJOUTER AU PANIER"
   ========================================================================== */

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(127, 179, 163, 0.95), rgba(127, 179, 163, 0.85));
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1;
}

.product-card:hover .card-overlay {
    transform: translateY(0);
}

.quick-add-btn,
.card-overlay .button,
.card-overlay .add_to_cart_button,
.card-overlay .added_to_cart {
    padding: 10px 24px;
    background: var(--color-white);
    color: var(--color-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.quick-add-btn:hover,
.card-overlay .button:hover,
.card-overlay .add_to_cart_button:hover,
.card-overlay .added_to_cart:hover {
    background: linear-gradient(135deg, var(--color-accent), #D66662);
    color: var(--color-white) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 84, 80, 0.3);
}

/* ==========================================================================
   CONTENU DE LA CARD
   ========================================================================== */

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Header: Catégorie + Origine */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.card-category {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-origin {
    background: rgba(127, 179, 163, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* Titre */
.card-title {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}

.card-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--color-primary);
}

/* Sous-titre (nom chinois) */
.card-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

/* Notation */
.card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
}

.stars {
    display: flex;
    gap: 1px;
}

.star {
    color: #E0E0E0;
    font-size: 0.9rem;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.star.filled {
    color: var(--color-accent);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.rating-count {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* Description */
.card-description {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   TAGS DE PROFIL (Végétal, Iodé, Umami)
   ========================================================================== */

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px 0;
}

.feature-tag {
    padding: 4px 8px;
    background: rgba(127, 179, 163, 0.1);
    color: var(--color-text-light);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==========================================================================
   PRIX
   ========================================================================== */

.card-price {
    display: flex;
    flex-direction: column;
    margin: 0 0 12px 0;
    padding-top: 12px;
    border-top: 1px solid rgba(127, 179, 163, 0.15);
}

.price-label {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-bottom: 4px;
}

.price-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ==========================================================================
   VARIATIONS (Vrac, Sachets, Boîte)
   ========================================================================== */

.card-variations {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.variation-option {
    flex: 1;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid rgba(127, 179, 163, 0.3);
    border-radius: 6px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.variation-option:hover {
    background: rgba(127, 179, 163, 0.1);
    border-color: var(--color-primary);
}

.variation-option.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .card-image {
        height: 200px;
    }

    .card-content {
        padding: 16px;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-description {
        -webkit-line-clamp: 2;
    }

    .card-actions {
        opacity: 1;
        transform: translateX(0);
    }

    .card-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(127, 179, 163, 0.85), transparent);
        padding: 12px;
    }
}

