/**
 * Cart Options Boxes Style
 * Style the options in cart to look like boxes similar to "Vos options sélectionnées"
 */

/* Container for all options */
.wcc-cart-options-container {
    width: 100%;
    margin: 10px 0;
}

/* Grid layout for options */
.wcc-cart-options-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 !important;
    width: 100% !important;
    align-items: flex-start !important;
}

/* Individual option box */
.wcc-cart-option-box {
    flex: 0 0 auto !important;
    width: auto !important;
    padding: 10px 15px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    background: #f8f8f8 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    position: relative !important;
    min-width: 110px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* Option image */
.wcc-cart-option-box img {
    width: 50px !important;
    height: 50px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    margin: 0 auto 6px auto !important;
    display: block !important;
}

/* Option label */
.wcc-cart-option-label {
    font-size: 11px !important;
    font-weight: normal !important;
    color: #666 !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

/* Option price */
.wcc-cart-option-price {
    font-size: 12px !important;
    font-weight: normal !important;
    color: var(--wcc-price-text-color, #d4a574) !important;
}

/* Special case for "Inclus" */
.wcc-cart-option-price:contains("Inclus") {
    color: #28a745 !important;
}

/* Hide X buttons in cart view */
.wcc-cart-option-box .remove-option,
.woocommerce-cart .remove {
    display: none !important;
}

/* Mobile adjustments - keep horizontal layout */
@media (max-width: 480px) {
    .wcc-cart-option-box {
        min-width: 90px !important;
        padding: 8px 12px !important;
    }
    
    .wcc-cart-option-box img {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Override WooCommerce default variation styling */
.woocommerce-mini-cart dl.variation,
.woocommerce-cart dl.variation {
    margin: 0 !important;
}

.woocommerce-mini-cart dl.variation dt,
.woocommerce-cart dl.variation dt {
    float: none !important;
    clear: both !important;
    margin-right: 0 !important;
    font-weight: bold !important;
    margin-bottom: 10px !important;
}

.woocommerce-mini-cart dl.variation dd,
.woocommerce-cart dl.variation dd {
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix for the dd that contains our grid */
.woocommerce-mini-cart dl.variation dd:has(.wcc-cart-options-container),
.woocommerce-cart dl.variation dd:has(.wcc-cart-options-container),
.woocommerce-mini-cart dl.variation dd,
.woocommerce-cart dl.variation dd {
    width: 100% !important;
    display: block !important;
    float: none !important;
    clear: both !important;
}

/* Ensure proper spacing in mini-cart */
.woocommerce-mini-cart-item dl.variation {
    margin-top: 10px !important;
}

/* Cart page specific adjustments */
.woocommerce-cart-form__cart-item .variation {
    margin-top: 10px !important;
}

.woocommerce-cart-form__cart-item .variation dt {
    font-size: 14px !important;
    color: #333 !important;
}

/* Fix total price display */
.woocommerce-mini-cart .woocommerce-mini-cart-item .quantity,
.woocommerce-cart .product-subtotal {
    display: block !important;
    visibility: visible !important;
}

/* Ensure the total section title appears correctly */
.wcc-cart-options-container + dt {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid #eee !important;
}