/* Logged-in purchase controls; guest calls to action retain their own layout. */
body.catalog-product-view .product-info-main .ls-purchase-controls {
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    margin: 20px 0 24px;
}
body.catalog-product-view .product-info-main .ls-purchase-controls > .fieldset {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
}
body.catalog-product-view .product-info-main .ls-purchase-controls .field.qty {
    flex: 0 0 56px;
    width: 56px;
    margin: 0;
    padding: 0;
}
body.catalog-product-view .product-info-main .ls-purchase-controls #qty {
    box-sizing: border-box;
    width: 56px;
    height: 48px;
    margin: 0;
    padding: 0 22px 0 10px;
    font-size: 16px;
}
body.catalog-product-view .product-info-main .ls-purchase-controls > .fieldset > div:not(.qty) {
    display: flex;
    flex: 1 1 0;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}
body.catalog-product-view .product-info-main .ls-purchase-controls #product-addtocart-button,
body.catalog-product-view .product-info-main .ls-purchase-controls #request-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 175px;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    min-height: 48px;
    height: auto;
    margin: 0;
    padding: 11px 10px;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    white-space: normal;
}
body.catalog-product-view .product-info-main .ls-purchase-controls #request-quote span {
    font-size: 16px;
    line-height: 24px;
}
body.catalog-product-view .product-info-main .ls-purchase-controls #request-quote::before {
    flex: 0 0 26px;
    width: 26px;
    height: 24px;
    margin: 0 8px 0 0;
    background-size: contain;
}

/* Bundle purchase controls: keep quantity and CTA on one compact, aligned row. */
body.catalog-product-view.page-product-bundle .bundle-options-container .box-tocart.ls-purchase-controls {
    width: 100%;
    max-width: 100%;
    margin: 12px 0 16px !important;
    padding: 0 !important;
}
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls > .fieldset {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls .field.qty {
    display: block;
    float: none !important;
    width: 64px !important;
    min-width: 0;
    height: 48px;
    margin: 0 !important;
    padding: 0 !important;
}
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls .field.qty .label {
    display: none;
}
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls .field.qty .control,
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls .field.qty input,
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls #qty {
    width: 64px !important;
    max-width: 64px;
    height: 48px !important;
    min-height: 48px;
    box-sizing: border-box;
    margin: 0 !important;
}
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls > .fieldset > .actions {
    display: flex !important;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls #product-addtocart-button,
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls #request-quote {
    display: flex !important;
    flex: 1 1 auto;
    width: 100% !important;
    max-width: none;
    height: 48px !important;
    min-height: 48px;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 10px 16px;
    align-items: center;
    justify-content: center;
}
@media (max-width: 767px) {
    body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls > .fieldset {
        grid-template-columns: 64px minmax(0, 1fr);
    }
}
body.catalog-product-view.page-product-bundle .bundle-options-container .price-box.price-configured_price {
    margin: 8px 0 0 !important;
    padding: 0 !important;
}

/* Keep the purchase row anchored to the option list instead of centered by Pearl. */
body.catalog-product-view.page-product-bundle .bundle-options-container .block-bundle-summary,
body.catalog-product-view.page-product-bundle .bundle-options-container .bundle-info {
    height: auto !important;
    min-height: 0 !important;
    text-align: left !important;
}
body.catalog-product-view.page-product-bundle .bundle-options-container .box-tocart.ls-purchase-controls {
    display: block !important;
    width: min(100%, 500px) !important;
    max-width: 500px !important;
    margin: 12px 0 16px !important;
    float: none !important;
    clear: both;
}
body.catalog-product-view.page-product-bundle .bundle-options-container .price-box.price-configured_price {
    width: 100% !important;
    margin: 8px 0 0 !important;
    text-align: left !important;
}

@media (max-width: 767px) {
    body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls > .fieldset {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }
    body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls #product-addtocart-button,
    body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls #request-quote {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

/* Keep quantity and add-to-cart flush with the top of the purchase area. */
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls {
    position: relative;
    top: 0 !important;
    align-self: start !important;
    transform: none !important;
}
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls > .fieldset {
    align-items: start !important;
}
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls .field.qty,
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls .field.qty .control,
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls .field.qty input,
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls #qty,
body.catalog-product-view.page-product-bundle .box-tocart.ls-purchase-controls #product-addtocart-button {
    height: 44px !important;
    min-height: 44px !important;
}

/* Logged-in bundle card: Pearl's sticky "bundle summary" (price, qty, add to
 * cart) sat at the bottom right with a 66px offset and moved while scrolling.
 * Show it as a static purchase panel: next to the options, top right, when the
 * card is wide enough; directly below the options otherwise. */
body.catalog-product-view.page-product-bundle .bundle-options-container {
    container-type: inline-size;
    container-name: ls-bundle-card;
}
body.catalog-product-view.page-product-bundle .bundle-options-container #bundleSummary:has(.ls-purchase-controls) {
    position: static !important;
    top: auto !important;
    float: none !important;
    width: auto !important;
    margin: 16px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
body.catalog-product-view.page-product-bundle #bundleSummary:has(.ls-purchase-controls) .product-details {
    display: flex;
    flex-direction: column;
}
body.catalog-product-view.page-product-bundle #bundleSummary .product-details > .price-box.price-configured_price {
    order: -1;
    margin: 0 0 12px !important;
}
body.catalog-product-view.page-product-bundle #bundleSummary .price-box .price-as-configured {
    margin: 0;
}
body.catalog-product-view.page-product-bundle #bundleSummary .price-box .price-wrapper > .price {
    font-size: 28px;
    line-height: 1.2;
}
body.catalog-product-view.page-product-bundle #bundleSummary .box-tocart.ls-purchase-controls {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}
body.catalog-product-view.page-product-bundle #bundleSummary #product-addtocart-button {
    white-space: nowrap;
}
@container ls-bundle-card (min-width: 680px) {
    body.catalog-product-view.page-product-bundle .bundle-options-container #product_addtocart_form:has(.ls-purchase-controls) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 290px;
        column-gap: 28px;
        align-items: start;
    }
    body.catalog-product-view.page-product-bundle #product_addtocart_form:has(.ls-purchase-controls) > .bundle-options-wrapper {
        grid-column: 1;
        grid-row: 1;
    }
    body.catalog-product-view.page-product-bundle .bundle-options-container #bundleSummary:has(.ls-purchase-controls) {
        grid-column: 2;
        grid-row: 1;
        margin: 0 !important;
        padding: 18px !important;
        border: 1px solid #eadfdb !important;
        border-radius: 10px;
        background: #ffffff !important;
    }
}
