/* Ensure fallback gap */
:root {
    --afeb-woo-atc-gap: 10px;
}

/* Main Flex Container: prevent any theme/WC display:block from sticking */
.afeb-woo-atc .afeb-woo-atc-inner,
.afeb-woo-atc .afeb-woo-atc-inner[style] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--afeb-woo-atc-gap, 10px) !important;
    flex-wrap: nowrap;
    line-height: inherit !important;

}
/* Ensure button text is always perfectly centered */
.afeb-woo-atc .afeb-woo-atc-button,
.afeb-woo-atc .afeb-woo-atc-button[style] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    line-height: inherit !important;
    height: auto; /* Let flexbox handle content height */
    white-space: nowrap; /* Optional: prevents wrapping if very wide */
}


/* Horizontal layout enforcement */
.afeb-woo-atc .afeb-woo-atc-inner.afeb-layout-horizontal {
    flex-direction: row !important;
}

/* Vertical layout enforcement */
.afeb-woo-atc .afeb-woo-atc-inner.afeb-layout-vertical {
    flex-direction: column !important;
}
.afeb-woo-atc .afeb-woo-atc-inner.afeb-layout-vertical .afeb-woo-atc-button {
    width: 100% !important;
}

/* Button styling and flex-centering */
.afeb-woo-atc .afeb-woo-atc-button,
.afeb-woo-atc .afeb-woo-atc-button[style] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: inherit !important;

}

/* Quantity input centering */
.afeb-woo-atc .afeb-woo-atc-qty input.qty {
    text-align: center;
    box-sizing: border-box;
    line-height: inherit !important;
}

/* Kill WooCommerce defaults that force block layouts */
.afeb-woo-atc .quantity,
.afeb-woo-atc form.cart {
    display: flex !important;
    line-height: inherit !important;
}

/* Make View Cart match Add to Cart defaults before overrides */
.afeb-woo-atc .afeb-view-cart {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: auto;
    white-space: nowrap;
}
