/* Style pour le conteneur principal */
.gift-wrap-container {
    clear: both;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.gift-wrap-container h2 {
    margin-top: 0;
}

/* Style pour l'option d'emballage cadeau */
.gift-wrap-option {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Style pour l'image du produit */
.gift-wrap-image img {
    max-width: 100px!important;
    height: auto;
    border-radius: 5px;
}

/* Style pour les détails du produit */
.gift-wrap-details {
    flex-grow: 1;
}

.gift-wrap-details h3 {
    margin: 0 0 5px 0;
}

.gift-wrap-details p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

/* Style pour la zone d'action (checkbox et prix) */
.gift-wrap-action {
    display: flex;
    align-items: center;
    background-color: black;
    color: white;
    padding:20px;
    border-radius: 15px;
    gap: 10px;
}

.gift-wrap-action .price {
    font-size: 1.2em;
    font-weight: bold;
    color: #c00;
}



/* Accessibilité : cacher visuellement mais garder pour lecteurs d'écran */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Spinner (masqué par défaut) */
.gw-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gw-spin 0.8s linear infinite;
}
@keyframes gw-spin { to { transform: rotate(360deg); } }

/* État loading */
#gift-wrap.is-loading .gift-wrap-action {
    opacity: 0.8;
    cursor: progress;
}
#gift-wrap.is-loading .gw-spinner {
    display: inline-block;
}
#gift-wrap.is-loading input[type="checkbox"] {
    pointer-events: none;
}
#gift-wrap.is-loading label {
    pointer-events: none;
}

/* Responsive */
.gift-wrap-option {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap; /* permet le retour à la ligne si nécessaire */
}

.gift-wrap-image img {
    max-width: 100px !important;
    height: auto;
    border-radius: 5px;
}

.gift-wrap-details {
    flex: 1 1 280px;
    min-width: 220px;
}

.gift-wrap-action {
    display: inline-flex;
    align-items: center;
    background-color: black;
    color: white;
    padding: 14px 16px;
    border-radius: 15px;
    gap: 10px;
    flex: 0 0 auto;
}

/* Petits écrans : tout en colonne, éléments à 100% */
@media (max-width: 600px) {

.gift-wrap-details {
    flex: 0;
    min-width: 220px;
}

    .gift-wrap-container {
        padding: 16px;
        border-radius: 8px;
    }
    .gift-wrap-option {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .gift-wrap-image img {
        max-width: 120px !important; /* un peu plus grand sur mobile, centré */
        display: block;
        margin: 0 auto;
    }
    .gift-wrap-details h3,
    .gift-wrap-details p {
        text-align: center;
    }
    .gift-wrap-action {
        width: 100%;
        justify-content: center;
        border-radius: 12px;
        padding: 12px 14px;
    }
    .gift-wrap-action .price {
        font-size: 1.1em;
    }
}