/* ============================================
   CARTES PRODUITS AMÉLIORÉES - Design Premium
   ============================================ */

/* Conteneur de la carte produit */
.single_product {
    position: relative;
    margin-bottom: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.single_product figure {
    position: relative;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.single_product figure:hover {
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25);
    transform: translateY(-10px);
}

/* Conteneur de l'image */
.single_product .product_thumb {
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding-top: 100%; /* Ratio 1:1 */
}

.single_product .product_thumb a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single_product .product_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.single_product:hover .product_thumb img {
    transform: scale(1.1) rotate(2deg);
}

/* Badge de réduction */
.product-discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(238, 90, 111, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(238, 90, 111, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(238, 90, 111, 0.6);
    }
}

/* Badge Vedette */
.product-featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.product-featured-badge::before {
    content: '⭐';
    font-size: 12px;
}

/* Badge Nouveau */
.product-new-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.product-new-badge::before {
    content: '✨';
    margin-right: 4px;
}

/* Badge Stock Bas */
.product-low-stock-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(245, 87, 108, 0.4);
    animation: blink-badge 2s ease-in-out infinite;
}

@keyframes blink-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Boutons d'action */
.single_product .action_links {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 15;
}

.single_product:hover .action_links {
    opacity: 1;
    visibility: visible;
}

.single_product .action_links ul {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.single_product .action_links li {
    margin: 0;
}

.single_product .action_links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.single_product .action_links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.single_product .action_links a:hover::before {
    left: 0;
}

.single_product .action_links a:hover {
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

/* Animation d'apparition des boutons */
.single_product .action_links li:nth-child(1) {
    animation: slideInButton 0.3s ease forwards;
    animation-delay: 0.1s;
}

.single_product .action_links li:nth-child(2) {
    animation: slideInButton 0.3s ease forwards;
    animation-delay: 0.2s;
}

.single_product .action_links li:nth-child(3) {
    animation: slideInButton 0.3s ease forwards;
    animation-delay: 0.3s;
}

@keyframes slideInButton {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contenu de la carte */
.single_product .product_content {
    padding: 25px 20px;
    background: white;
    border-radius: 0 0 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Le prix reste toujours en bas */
.single_product .price_box {
    margin-top: auto;
}

/* Titre du produit */
.single_product .product_content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.single_product .product_content h4 a {
    color: #2d3748;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.single_product .product_content h4 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.single_product .product_content h4 a:hover {
    color: #667eea;
}

.single_product .product_content h4 a:hover::after {
    width: 100%;
}

/* Catégorie */
.product-category {
    font-size: 13px;
    color: #718096;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.product-category i {
    color: #667eea;
}

/* Description courte */
.product-description {
    font-size: 13px;
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Prix */
.single_product .price_box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.single_product .current_price {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.single_product .old_price {
    font-size: 16px;
    color: #a0aec0;
    text-decoration: line-through;
    font-weight: 500;
}

/* Note/Rating */
.product-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.product-rating i {
    color: #fbbf24;
    font-size: 14px;
}

.product-rating .rating-count {
    font-size: 12px;
    color: #718096;
    margin-left: 5px;
}

/* Overlay au hover */
.single_product .product_thumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 5;
}

.single_product:hover .product_thumb::before {
    opacity: 1;
}

/* Badge de statut (En stock / Épuisé) */
.product-stock-status {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.product-stock-status.in-stock {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(72, 187, 120, 0.4);
}

.product-stock-status.out-of-stock {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(160, 174, 192, 0.4);
}

/* Effet de brillance au survol */
@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.single_product .product_thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    z-index: 20;
    pointer-events: none;
}

.single_product:hover .product_thumb::after {
    animation: shine 0.8s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .single_product figure {
        border-radius: 15px;
    }
    
    .single_product .product_thumb {
        border-radius: 15px 15px 0 0;
    }
    
    .single_product .product_content {
        padding: 20px 15px;
    }
    
    .single_product .product_content h4 {
        font-size: 16px;
    }
    
    .single_product .current_price {
        font-size: 20px;
    }
    
    .single_product .action_links a {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Animation de chargement de l'image - DÉSACTIVÉE */
.single_product .product_thumb img {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* S'assurer que les produits sont toujours visibles */
.single_product {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.single_product.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.single_product.is-visible figure {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* Effet de scintillement pour les produits en promotion */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.single_product.on-sale::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
    pointer-events: none;
    z-index: 1;
    border-radius: 20px;
}

/* Wishlist Controls - Buttons and Quantity */
.single_product .wishlist_controls {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    margin: 10px 12px 12px;
}

.single_product .wishlist_controls .add_to_cart_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    color: #fff;
    border: none;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.single_product .wishlist_controls .add_to_cart_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.35);
    filter: brightness(1.03);
}

.single_product .wishlist_controls .add_to_cart_btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.single_product .wishlist_controls .remove_wishlist_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(231, 76, 60, 0.35);
    color: #e74c3c;
    background: #fff;
    transition: all 0.2s ease;
}

.single_product .wishlist_controls .remove_wishlist_btn:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

.single_product .wishlist_controls .remove_wishlist_btn i {
    font-size: 16px;
}

.single_product .wishlist_controls .pro-qty,
.single_product .wishlist_controls .quantity_box {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.single_product .wishlist_controls .pro-qty .qty-btn,
.single_product .wishlist_controls .qty_decrease,
.single_product .wishlist_controls .qty_increase {
    width: 40px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
    color: #8f8989;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.single_product .wishlist_controls .pro-qty .qty-btn:hover,
.single_product .wishlist_controls .qty_decrease:hover,
.single_product .wishlist_controls .qty_increase:hover {
    background: var(--primary-color, #fff);
    color: #fff;
}

.single_product .wishlist_controls .qty_input {
    width: 49px;
    height: 38px;
    border: none;
    text-align: center;
    font-weight: 700;
    color: #2d3748;
    outline: none;
}

