/* Styles frontend pour Simple Bundle */

.simple-bundle-add-to-cart {
    display: flex;
}

/* Contenu du bundle sur la page produit */
.simple-bundle-contents {
    margin: 20px 0;
    padding: 20px;
}

.bundle-contents-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    position: relative;
}

/* Liste des items du bundle */
.bundle-items-list {
    margin-bottom: 20px;
}

.bundle-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
}

.bundle-item:last-child {
    margin-bottom: 0;
}

.bundle-item-image {
    margin-right: 15px;
    flex-shrink: 0;
}

.bundle-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.bundle-item-details {
    flex-grow: 1;
}

.bundle-item-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}



.bundle-item-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.bundle-item-quantity {
    font-size: 14px;
    position: relative;
}



.bundle-item-price {
    font-weight: 600;
    font-size: 14px;
}

.bundle-item-description {
    font-size: 14px;
    line-height: 1.5;
}

/* Résumé des prix */
.bundle-pricing-summary {
    padding: 15px;
    margin-top: 20px;
}

.bundle-pricing-summary > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.bundle-pricing-summary > div:last-child {
    border-bottom: none;
}

.individual-total .label {
    font-size: 14px;
}

.bundle-total {
    font-weight: 600;
    font-size: 16px;
}

.bundle-total .price {
    font-size: 18px;
}

.savings {
    font-weight: 600;
}

.savings-amount {
    font-size: 16px;
}

.simple-bundle-add-to-cart .quantity {
    margin: 0;
}

.simple-bundle-add-to-cart .single_add_to_cart_button {
    position: relative;
}



/* Dans le panier */
.bundle-contents {
    font-style: italic;
    color: #666;
    font-size: 12px;
}

.bundle-indicator {
    color: #0073aa;
    font-weight: 500;
}

.bundle-indicator::before {
    content: "\f149";
    font-family: "dashicons";
    margin-right: 3px;
}

/* Bundles liés */
.related-bundles {
    margin: 30px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.related-bundles h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.related-bundles h3::before {
    content: "\f149";
    font-family: "dashicons";
    margin-right: 8px;
    color: #0073aa;
}

.bundles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.bundles-list .bundle-item {
    text-align: center;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bundles-list .bundle-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bundles-list .bundle-item a {
    text-decoration: none;
    color: inherit;
}

.bundles-list .bundle-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.bundles-list .bundle-item h4 {
    margin: 10px 0 8px 0;
    font-size: 14px;
    color: #333;
}

.bundles-list .bundle-item .price {
    font-weight: 600;
    color: #0073aa;
}

/* États spéciaux */
.bundle-out-of-stock {
    opacity: 0.6;
    position: relative;
}

.bundle-out-of-stock::after {
    content: "Rupture de stock";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3232;
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Produits hors stock dans les bundles */
.bundle-item-out-of-stock {
    opacity: 0.6;
    filter: grayscale(50%);
}

.bundle-item-out-of-stock .bundle-item-image {
    position: relative;
}

.out-of-stock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 50, 50, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.bundle-out-of-stock-notice {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.bundle-out-of-stock-notice .stock.out-of-stock {
    color: #721c24;
    font-weight: 600;
    margin: 0;
}

/* Badges et indicateurs */
.bundle-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 5px;
}

.bundle-badge.new::before {
    content: "\f147";
    font-family: "dashicons";
    margin-right: 2px;
}

.bundle-badge.sale::before {
    content: "\f12a";
    font-family: "dashicons";
    margin-right: 2px;
}

.bundle-badge.popular::before {
    content: "\f155";
    font-family: "dashicons";
    margin-right: 2px;
}

.bundle-badge.new {
    background: #46b450;
    color: white;
}

.bundle-badge.sale {
    background: #ff6b35;
    color: white;
}

.bundle-badge.popular {
    background: #ffb900;
    color: white;
}



/* Responsif */
@media (max-width: 768px) {
    .bundle-item {
        flex-direction: column;
        text-align: center;
    }
    
    .bundle-item-image {
        margin: 0 0 15px 0;
    }
    
    .bundle-item-meta {
        justify-content: center;
    }
    
    .simple-bundle-add-to-cart {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bundle-pricing-summary > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .bundles-list {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .simple-bundle-contents {
        margin: 15px 0;
        padding: 15px;
    }
    
    .bundle-item {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .bundle-item-image img {
        width: 50px;
        height: 50px;
    }
    
    .bundle-contents-title {
        font-size: 16px;
    }
}





/* Print styles */
@media print {
    .simple-bundle-add-to-cart {
        display: none;
    }
    
    .bundle-item {
        break-inside: avoid;
    }
    
    .simple-bundle-contents {
        border: 1px solid #000;
        background: white;
    }
} 