/* ==========================================================================
   LET'S GET DIGITAL: PIL, VOORRAAD & WINKELWAGEN
   ========================================================================== */

/* --- 1. DESKTOP & ALGEMEEN --- */

/* Fix: Dwing de volledige product info kolom terug naar links */
.woocommerce div.product .entry-summary,
.kadence-woo-template-single-product .wp-block-kadence-column {
    text-align: left !important;
}

/* De Pil Styling */
.lgd-pill-badge {
    display: inline-flex !important;
    align-items: center !important;
    background-color: rgba(49, 167, 169, 0.12) !important;
    color: #05323E !important;
    padding: 6px 14px !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important; 
    margin-bottom: 0 !important;
}

.lgd-pill-badge .kb-svg-icon-wrap {
    color: #31A7A9 !important;
    margin-right: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.lgd-pill-badge .kb-adv-text-inner {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    white-space: normal !important; 
}

/* Custom Voorraad Tekst */
span.digital-custom-stock {
    margin-bottom: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 6px 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}
span.digital-custom-stock.in-stock { color: #31A7A9 !important; }
span.digital-custom-stock.out-of-stock,
span.digital-custom-stock.available-on-backorder { color: #BC2E55 !important; }

/* Container Uitlijning (Desktop) */
.kt-inside-inner-col:has(> .lgd-pill-badge) {
    display: flex;
    flex-wrap: wrap;
    align-items: center; /* Zorgt dat pil en voorraad verticaal mooi in het midden van elkaars lijn staan */
    justify-content: flex-start !important; /* Dwingt alles horizontaal naar links */
    gap: 15px;
    margin-bottom: 15px;
}


/* --- 2. MOBIELE WEERGAVE --- */

@media screen and (max-width: 767px) {
    /* Container dwingen naar links */
    .kt-inside-inner-col:has(> .lgd-pill-badge) {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    /* Voorraadtekst netjes links uitlijnen */
    span.digital-custom-stock {
        align-self: flex-start !important;
        text-align: left !important;
    }

    /* FIX: De Pil op mobiel met de 25px truc */
    .lgd-pill-badge {
        display: inline-block !important; 
        white-space: normal !important;
        height: auto !important;
        text-align: left !important;
        padding: 8px 14px !important;
        word-wrap: break-word !important;
        max-width: calc(100% - 25px) !important; /* Voorkomt het afbreken buiten scherm */
        margin-right: 25px !important;
    }

    /* FIX: Winkelwagen container layout */
    .woocommerce div.product form.cart {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important; 
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .woocommerce div.product form.cart .quantity {
        flex: 0 0 auto !important;
    }

    /* FIX: De knop op mobiel met de 25px truc */
    .woocommerce div.product form.cart .single_add_to_cart_button {
        flex: 1 1 auto !important; 
        width: calc(100% - 25px) !important; /* Voorkomt het afbreken buiten scherm */
        margin-right: 25px !important;
        white-space: normal !important;
        box-sizing: border-box !important;
        margin-top: 5px !important;
    }
}