/**
 * Styles pour le widget de recommandations
 */

.wp-affiliate-recommendations-widget {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    padding: 20px;
}

.wp-affiliate-recommendations-widget h3 {
    color: #3a3a3a;
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
}

.recommendation-intro {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
    font-style: italic;
}

/* Style du carrousel */
.recommendations-carousel {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    gap: 15px;
}

.recommendations-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Style des cartes de produits */
.recommendation-card {
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex: 0 0 auto;
    margin-right: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 220px;
    border: 1px solid #eee;
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.recommendation-image {
    height: 140px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.recommendation-image img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.recommendation-details {
    padding: 15px;
}

.product-name {
    color: #333;
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 10px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    color: #4c7daf;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-variations {
    margin-bottom: 10px;
}

.variations-indicator {
    background-color: #f2f2f2;
    border-radius: 4px;
    color: #666;
    display: inline-block;
    font-size: 0.8em;
    padding: 3px 8px;
}

.add-to-order-button {
    background-color: #4c7daf;
    border: none;
    border-radius: 4px;
    color: white !important;
    cursor: pointer;
    display: inline-block;
    font-size: 0.9em;
    font-weight: 600;
    padding: 8px 15px;
    text-align: center;
    text-decoration: none !important;
    transition: background-color 0.3s ease;
    width: 100%;
}

.add-to-order-button:hover {
    background-color: #3a6491;
}

/* Style des contrôles du carrousel */
.carousel-controls {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}

.carousel-controls button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    font-size: 1.2em;
    height: 36px;
    line-height: 36px;
    padding: 0;
    transition: all 0.3s ease;
    width: 36px;
}

.carousel-controls button:hover {
    background-color: #4c7daf;
    color: white;
}

/* Styles responsifs */
@media (max-width: 768px) {
    .recommendation-card {
        width: 180px;
    }
    
    .recommendation-image {
        height: 120px;
    }
    
    .recommendation-image img {
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    .recommendation-card {
        width: 160px;
    }
    
    .recommendation-image {
        height: 100px;
    }
    
    .recommendation-image img {
        max-height: 100px;
    }
    
    .add-to-order-button {
        font-size: 0.8em;
        padding: 6px 10px;
    }
}

/* Styles pour le mode RTL (arabe) */
.rtl .wp-affiliate-recommendations-widget {
    direction: rtl;
    text-align: right;
}

.rtl .recommendation-card {
    margin-right: 0;
    margin-left: 15px;
}

.rtl .carousel-controls {
    flex-direction: row-reverse;
}