/**
 * FORCE HORIZONTAL CART OPTIONS DISPLAY
 * Diagnostic CSS to override any conflicting styles
 */

/* NUCLEAR OVERRIDE - Force horizontal display in cart */
.woocommerce-cart .wcc-cart-options-grid,
.woocommerce-mini-cart .wcc-cart-options-grid,
.cart_item .wcc-cart-options-grid,
tr.cart_item .wcc-cart-options-grid,
.woocommerce-cart-form__cart-item .wcc-cart-options-grid,
dl.variation dd .wcc-cart-options-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    clear: both !important;
    float: none !important;
}

/* Force option boxes to display inline */
.woocommerce-cart .wcc-cart-option-box,
.woocommerce-mini-cart .wcc-cart-option-box,
.cart_item .wcc-cart-option-box,
tr.cart_item .wcc-cart-option-box,
.woocommerce-cart-form__cart-item .wcc-cart-option-box,
dl.variation dd .wcc-cart-option-box {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    float: none !important;
    width: auto !important;
    max-width: 150px !important;
    min-width: 110px !important;
    vertical-align: top !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Override any theme/WooCommerce dl.variation styles */
.woocommerce-cart dl.variation,
.woocommerce-mini-cart dl.variation,
.cart_item dl.variation,
tr.cart_item dl.variation {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    clear: both !important;
}

/* Force dt and dd to proper display */
.woocommerce-cart dl.variation dt,
.woocommerce-mini-cart dl.variation dt,
.cart_item dl.variation dt,
tr.cart_item dl.variation dt {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 0 10px 0 !important;
    font-weight: bold !important;
    text-align: left !important;
}

.woocommerce-cart dl.variation dd,
.woocommerce-mini-cart dl.variation dd,
.cart_item dl.variation dd,
tr.cart_item dl.variation dd {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
}

/* Specific override for variation table display */
.woocommerce-cart .variation,
.woocommerce-mini-cart .variation,
.cart_item .variation,
tr.cart_item .variation {
    display: block !important;
    width: 100% !important;
}

/* Force container to take full width */
.wcc-cart-options-container {
    display: block !important;
    width: 100% !important;
    margin: 10px 0 !important;
    padding: 0 !important;
    clear: both !important;
    float: none !important;
}

/* Override any table cell constraints */
td.product-name .wcc-cart-options-container,
.woocommerce-cart-form__cart-item .wcc-cart-options-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* Debug borders removed for production */

/* Remove any column-like display that might be inherited */
.woocommerce-cart .wcc-cart-options-grid > *,
.woocommerce-mini-cart .wcc-cart-options-grid > *,
dl.variation dd .wcc-cart-options-grid > * {
    display: inline-flex !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
}

/* Force flexbox on parent containers */
.woocommerce-cart td.product-name,
.woocommerce-mini-cart .woocommerce-mini-cart-item {
    display: block !important;
}

/* Override any grid or column layouts from theme */
.wcc-cart-options-grid[class*="col-"],
.wcc-cart-options-grid[class*="column"],
.wcc-cart-option-box[class*="col-"],
.wcc-cart-option-box[class*="column"] {
    width: auto !important;
    max-width: 150px !important;
    flex: 0 0 auto !important;
}

/* Ensure options don't stack vertically due to width constraints */
@media (min-width: 768px) {
    .woocommerce-cart dl.variation dd {
        min-width: 400px !important;
    }
}

/* Remove any list-like styling */
.wcc-cart-options-grid ul,
.wcc-cart-options-grid ol,
.wcc-cart-options-grid li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
}

/* Force inline-block for all direct children */
.wcc-cart-options-grid > div,
.wcc-cart-options-grid > span,
.wcc-cart-options-grid > article,
.wcc-cart-options-grid > section {
    display: inline-flex !important;
    vertical-align: top !important;
}

/* Override any conflicting styles from WooCommerce blocks */
.wp-block-woocommerce-cart .wcc-cart-options-grid,
.wp-block-woocommerce-mini-cart .wcc-cart-options-grid {
    display: flex !important;
    flex-direction: row !important;
}

/* High specificity override for theme styles */
body.woocommerce-cart .woocommerce .wcc-cart-options-grid,
body.woocommerce-cart #content .wcc-cart-options-grid,
.woocommerce-page .wcc-cart-options-grid,
.woocommerce .wcc-cart-options-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
}