/**
 * CSS pour le composant de produit mis en avant
 * Optimisé pour la compatibilité mobile
 */

 .featured-product {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    max-width: 100%; /* Assure que le conteneur ne dépasse pas sa largeur parent */
    box-sizing: border-box; /* Inclut padding et border dans la largeur */
    margin: 0 auto; /* Centre le contenu */
    padding: 0 10px; /* Ajoute un peu d'espace sur les côtés */
}

.featured-product-image,
.featured-product-details {
    flex: 1;
    min-width: 280px; /* Réduit légèrement pour éviter les débordements */
    width: 100%; /* Force la largeur à 100% de son conteneur */
    box-sizing: border-box;
}

/* Sur mobile, empiler verticalement */
@media (max-width: 768px) {
    .featured-product {
        flex-direction: column;
        align-items: stretch;
    }
    
    .featured-product-image,
    .featured-product-details {
        min-width: 100%;
        max-width: 100%;
    }
}

/* Style pour l'image */
.featured-product-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    max-width: 100%; /* Empêche l'image de déborder */
    object-fit: contain; /* Assure que l'image s'adapte à son conteneur */
}

.variation-options .radio-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%; /* Assure que les options occupent toute la largeur */
}

/* Style pour les détails du produit */
.featured-product-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Style pour les options de variation */
.variation-options .radio-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: medium;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.variation-options .radio-option:hover {
    background-color: var(--wp--preset--color--brown);
}

.variation-options .radio-option input[type="radio"] {
    display: none;
}

.variation-options .radio-option .option-label {
    font-weight: bold;
}

.variation-options .radio-option .option-price {
    color: var(--wp--preset--color--dark);
    font-weight: bold;
    word-break: normal; /* Évite les coupures de mots */
}

/* Adapter le prix sur les petits écrans */
@media (max-width: 480px) {
    .variation-options .radio-option {
        flex-wrap: wrap;
    }
    
    .variation-options .radio-option .option-price {
        width: 100%;
        margin-top: 5px;
        text-align: right;
    }
}

/* Style pour le bouton radio sélectionné */
.variation-options .radio-option.selected {
    background-color: var(--wp--preset--color--brown);
    color: #ffffff;
    border-color: var(--wp--preset--color--brown);
}

.variation-options .radio-option input[type="radio"]:checked + .option-label {
    color: #ffffff;
}

.variation-options .radio-option input[type="radio"]:checked ~ .option-price {
    color: #ffffff;
}

/* Style pour les messages */
.direct-add-to-cart .variation-error {
    margin-top: 10px;
    font-weight: bold;
}

.single_add_to_cart_button {
    width: 100%; /* Rend le bouton pleine largeur sur mobile */
    margin-top: 15px;
    padding: 12px 15px;
}

.single_add_to_cart_button.added {
    background-color: #4CAF50;
}

/* Assurer que le formulaire s'adapte à sa div parente */
.direct-add-to-cart {
    width: 100%;
    box-sizing: border-box;
}

/* Button */
.featured-product button {
    margin-top: 1rem;
}
.featured-product button:disabled {
    opacity: 0.6;       /* Rend le bouton semi-transparent */
    cursor: not-allowed; /* Change le curseur en "interdit" */
    background-color: #cccccc; /* Couleur de fond grise */
    color: #666666;     /* Couleur du texte plus claire */
    border: 1px solid #999999;
}