/* Dual Price WooCommerce - VERSION 1 : BADGE MODERNE "LE PLUS ÉCONOMIQUE" */

.dual-price-container {
    margin: 20px 0 30px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.dual-price-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #333;
}

.dual-price-options-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.price-option {
    position: relative;
    transition: all 0.3s ease;
}

.price-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.price-option label {
    display: block;
    padding: 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.price-option label:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Style spécial pour l'option Europe (la moins chère) */
.price-option[data-price-type="europe"] label {
    border: 3px solid #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.price-option[data-price-type="europe"] label:hover {
    border-color: #28a745;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
    transform: translateY(-3px);
}

.price-option input[type="radio"]:checked + label {
    border-color: #0071a1;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(0, 113, 161, 0.15);
}

/* Surcharge pour Europe sélectionné */
.price-option[data-price-type="europe"] input[type="radio"]:checked + label {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f8ec 0%, #f0f8ff 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.25);
}

.price-option-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.option-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.option-price {
    font-size: 28px;
    font-weight: 700;
    color: #0071a1;
}

/* Prix Europe en vert pour le mettre en valeur */
.price-option[data-price-type="europe"] .option-price {
    color: #28a745;
    font-size: 32px;
}

.price-option input[type="radio"]:checked + label .option-price {
    color: #005177;
}

.price-option[data-price-type="europe"] input[type="radio"]:checked + label .option-price {
    color: #1e7e34;
}

.option-delivery {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.option-delivery-detail {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.price-option input[type="radio"]:checked + label .option-delivery {
    color: #0071a1;
    font-weight: 500;
}

.price-option input[type="radio"]:checked + label .option-delivery-detail {
    color: #0071a1;
    font-weight: 500;
}

/* Mention réduction livraison - VERSION 3 : ENCADRÉ PREMIUM OR */
.option-shipping-discount {
    font-size: 17px;
    color: #1a1a1a;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 14px 22px;
    border-radius: 12px;
    text-align: center;
    margin-top: 15px;
    display: inline-block;
    border: 4px solid #ff6b35;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.option-shipping-discount::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shine-shipping 3s infinite;
}

@keyframes shine-shipping {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.price-option input[type="radio"]:checked + label .option-shipping-discount {
    border-color: #28a745;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.8);
}

.price-option[data-price-type="europe"] input[type="radio"]:checked + label .option-shipping-discount {
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    }
    50% {
        background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    }
}

/* Badge "LE PLUS ÉCONOMIQUE" - Version 1 */
.price-option[data-price-type="europe"]::before {
    content: "🔥 LE PLUS ÉCONOMIQUE";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    z-index: 10;
    white-space: nowrap;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

/* Badge checkmark pour l'option sélectionnée */
.price-option input[type="radio"]:checked + label::after {
    content: "✓";
    position: absolute;
    top: 15px;
    right: 15px;
    background: #0071a1;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    z-index: 5;
}

.price-option[data-price-type="europe"] input[type="radio"]:checked + label::after {
    background: #28a745;
}

/* Styles pour le panier */
.delivery-time {
    color: #666;
    font-style: italic;
    display: inline-block;
    margin-top: 5px;
}

.delivery-shipping-discount {
    color: #1a1a1a !important;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    font-weight: 800 !important;
    font-style: normal !important;
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    border: 3px solid #ff6b35;
}

/* Icône d'économie */
.price-option[data-price-type="europe"] .option-price::before {
    content: "💰 ";
    font-size: 24px;
    margin-right: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .dual-price-options-wrapper {
        grid-template-columns: 1fr;
    }
    
    .dual-price-container {
        padding: 15px;
    }
    
    .option-price {
        font-size: 24px;
    }
    
    .price-option[data-price-type="europe"] .option-price {
        font-size: 28px;
    }
    
    .price-option[data-price-type="europe"]::before {
        font-size: 11px;
        padding: 5px 15px;
    }
}

/* Admin styles */
.dual-price-options {
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-top: 12px;
}

/* Styles pour les listings (pages boutique, catégories, archives) */
.dual-price-listing {
    display: block;
}

.dual-price-listing .price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dual-price-listing .price del {
    font-size: 0.9em;
    color: #999;
    opacity: 0.7;
}

.dual-price-listing .price ins,
.dual-price-listing .price > .woocommerce-Price-amount {
    text-decoration: none;
    color: #28a745;
    font-weight: 700;
    font-size: 1.1em;
}

.dual-price-badge-small {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    margin-left: 5px;
    vertical-align: middle;
}

/* Badge "Économisez" dans les listings */
.dual-price-savings-badge {
    display: inline-block;
    background: #ffc107;
    color: #000;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    margin-top: 5px;
}

/* Responsive pour les listings */
@media (max-width: 768px) {
    .dual-price-listing .price {
        font-size: 0.95em;
    }
    
    .dual-price-badge-small {
        font-size: 0.7em;
        padding: 2px 6px;
    }
}

/* Badge dans les listes de produits (shop, archives) */
.dual-price-badge-loop {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dual-price-badge-loop .badge-economy {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.4);
    text-align: center;
    white-space: nowrap;
}

.dual-price-badge-loop .badge-delivery {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

/* Assurer que le conteneur de l'image est en position relative */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    position: relative;
}

.woocommerce ul.products li.product {
    position: relative;
}
