/**
 * Machine PDP — added-to-cart modal (Nespresso-style: slider + cards + CTAs)
 */

.machine-atc-popup-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'NespressoLucas', Arial, Helvetica, sans-serif;
}

body:has(.machine-atc-popup-wrapper._show) .modals-overlay {
    background-color: rgba(0, 0, 0, 0.74);
}

.machine-atc-popup-wrapper .modal-inner-wrap {
    box-shadow: 0 0 60px 10px rgb(0 0 0 / 90%);
    border-radius: 5px;
    margin: 0px auto;
    min-width: 35%;
    max-width: 80%;
}

.machine-atc-popup-template {
    display: none;
}

.machine-atc-popup-wrapper .machine-atc-popup-template {
    display: block;
}

.machine-atc-popup-wrapper .modal-header {
    padding: 0px;
}

.machine-atc-popup-wrapper .modal-header .modal-title {
    padding: 0px;
}

.machine-atc-popup-wrapper .modal-header .action-close {
    background: #000;
    padding: 0px;
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 10px;
    right: 10px;
}

.machine-atc-popup-wrapper .modal-header .action-close:before {
    color: #ffffff;
}

.machine-atc-popup-wrapper .modal-content {
    padding: 10px;
}

.machine-atc-popup-wrapper .machine-atc-popup__header {
    padding: 10px 0px;
}

.machine-atc-popup-wrapper .machine-atc-popup__header-main {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 88%;
}

.machine-atc-popup-wrapper .machine-atc-popup__product-image {
    width: 85px;
    height: 85px;
    object-fit: contain;
}

.machine-atc-popup-wrapper .machine-atc-popup__promo {
    font-weight: 700;
    font-size: 25px;
    padding: 10px 5px;
    line-height: 25px;
    margin: 5px 0px;
    font-family: 'NespressoLucas', Arial, Helvetica, sans-serif;
}

.machine-atc-popup-wrapper .machine-atc-popup__slider {
    display: flex;
    justify-content: space-around;
    padding: 15px 10px;
    gap: 20px;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
}

.machine-atc-popup-wrapper .machine-atc-popup__card {
    min-width: 170px;
    flex: 1;
    transition: border 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 0 8px rgba(23, 23, 26, .05), 0 0 8px rgba(23, 23, 26, .05);
    background: #ffffff;
    padding: 8px;
    box-sizing: border-box;
}

.machine-atc-popup-wrapper .machine-atc-popup__card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.machine-atc-popup-wrapper .machine-atc-popup__card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    flex: 1;
}

.machine-atc-popup-wrapper .machine-atc-popup__card:hover {
    border: 2px solid #125539;
}

.machine-atc-popup-wrapper .machine-atc-popup__card-media {
    width: 75px;
    margin: 0px auto;
    display: block;
}

.machine-atc-popup-wrapper .machine-atc-popup__card-name {
    font-size: 18px;
    line-height: 20px;
    color: #000000;
    font-weight: 700;
    padding: 0px 8px;
}

.machine-atc-popup-wrapper .machine-atc-popup__card-name:hover {
    color: #000000;
}

.machine-atc-popup-wrapper .machine-atc-popup__card-desc {
    font-size: 15px;
    line-height: 18px;
    padding: 0px 8px;
}

.machine-atc-popup-wrapper .machine-atc-popup__card-footer-row {
    display: flex;
    align-items: center;
    padding: 16px 8px 0px;
    border-top: 1px solid rgb(231, 231, 231);
    gap: 4px;
    margin-top: auto;
}

.machine-atc-popup-wrapper .machine-atc-popup__card-prices {
    flex: 1;
    text-align: left;
}
.machine-atc-popup-wrapper .qty-box.pdpcart .close-cart-popup {
    display: none;
}
.machine-atc-popup-wrapper .machine-atc-popup__card-actions {
    position: relative;
}

.machine-atc-popup-wrapper .machine-atc-popup__card-actions .pdpcart-btn {
    min-width: 40px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 2px;
}

.machine-atc-popup-wrapper .machine-atc-popup__price-final {
    color: #257A57;
    font-weight: bold;
}

.machine-atc-popup-wrapper .machine-atc-popup__price-old {
    text-decoration: line-through;
    text-decoration-color: #6f6f70;
    color: #6f6f70;
    font-weight: 500;
}

.machine-atc-popup-wrapper .machine-atc-popup__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px 0 10px;
    margin-top: 22px;
}

.machine-atc-popup-wrapper .machine-atc-popup__btn--secondary {
    font-weight: 400;
    color: #257a57;
    padding: 13px 20px;
    border: 1px solid #257a57;
    border-radius: 25px;
    max-width: 200px;
    width: 100%;
    text-align: center;
    cursor: pointer;
    line-height: normal;
}

.machine-atc-popup-wrapper .machine-atc-popup__btn--secondary:hover {
    background-color: #ededed;
}

.machine-atc-popup-wrapper .machine-atc-popup__btn--primary {
    font-weight: 400;
    color: #fff;
    padding: 13px 20px;
    border-radius: 25px;
    background-color: #257a57;
    max-width: 200px;
    width: 100%;
    text-align: center;
}

.machine-atc-popup-wrapper .machine-atc-popup__btn--primary:hover {
    background-color: #125539;
}

.growisto-model-machine-list {
    margin-top: 14px;
}

.growisto-model-machine-list__title {
    font-size: 16px;
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 12px;
}

.growisto-model-machine-list__items {
    display: flex;
    flex-direction: column;
}

.growisto-model-machine-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    background: #ffffff;
    color: #17171a;
    border: 1px solid #c5c5c5;
    padding: 16px;
    border-radius: 16px;
    margin: 0px 0px 12px !important;
}

.growisto-model-machine-list__name {
    letter-spacing: 0.25px;
    color: #17171a;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 600;
    flex: 1;
}

.growisto-model-machine-list__prices {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.growisto-model-machine-list__prices .customprice-conf {
    flex-direction: column-reverse;
    align-items: end !important;
}

.growisto-model-machine-list__prices .customprice-conf .price-labels {
    display: flex;
    justify-content: end;
    align-items: center;
    column-gap: 4px;
    line-height: 1.2;

}
.growisto-model-machine-list__prices .customprice-conf .label-mrp {
    font-size: inherit !important;
    font-weight: 400 !important;
}
.growisto-model-machine-list__price-old {
    color: #6f6f70;
    text-decoration: line-through;
}

.growisto-model-machine-list__price-final {
    color: #257a57;
    font-weight: 700;
}

@media only screen and (max-width: 768px) {
    .machine-atc-popup-wrapper {
        align-items: end;
    }

    .machine-atc-popup-wrapper .modal-inner-wrap {
        max-width: 100%;
        width: 100%;
    }

    .machine-atc-popup-wrapper .modal-header .action-close {
        width: 30px;
        height: 30px;
    }

    .machine-atc-popup-wrapper .modal-header .action-close:before {
        font-size: 30px;
    }

    .machine-atc-popup-wrapper .machine-atc-popup__product-image {
        display: none;
    }

    .machine-atc-popup-wrapper .machine-atc-popup__promo {
        font-size: 21px;
        line-height: 1;
    }
    .machine-atc-popup-wrapper .machine-atc-popup__card-actions {
        position: static;
    }
    .machine-atc-popup-wrapper .machine-atc-popup__slider-outer {
        position: relative;
    }
    .machine-atc-popup-wrapper .qty-box.pdpcart.active.body-popup-overlay {
        top: 50% !important;
        transform: translate(50%, -50%) !important;
    }
    .machine-atc-popup-wrapper .qty-box.pdpcart.active.body-popup-overlay::before,
    .machine-atc-popup-wrapper .qty-box.pdpcart.active.body-popup-overlay::after {
        display: none;
    }
    .machine-atc-popup-wrapper  .qty-box.pdpcart.active.body-popup-overlay > .qty-box__overlay-wrapper {
        width: 200px;
    }

}

/* Bundle config popup on new machine PDP */
body.new-machine-pdp.page-product-bundle .machine-price-options {
    min-height: 0;
}

body.new-machine-pdp.page-product-bundle .machine-price-options .product-options-wrapper {
    visibility: hidden;
}

body.new-machine-pdp.page-product-bundle.machine-bundle-popup-ready .machine-price-options .product-options-wrapper {
    visibility: visible;
}

.machine-bundle-config-open {
    overflow: hidden;
}

.machine-bundle-config-modal {
    display: none;
}

.machine-bundle-config-modal.is-open {
    display: block;
}

.machine-bundle-config-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
}

.machine-bundle-config-modal__dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    max-width: calc(100% - 30px);
    width: 800px;
    max-height: 88vh;
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    padding: 0px 20px;
    box-sizing: border-box;
}
.machine-bundle-config-modal__header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 20px 0px 10px;
    box-sizing: border-box;
}
.machine-bundle-config-modal__dialog .machine-bundle-config-modal__content {
    margin-top: 20px;
}

.machine-bundle-config-modal__title {
    font-size: 20px;
    font-weight: 700;
    padding-right: 30px;
}

.machine-bundle-config-modal__step-count {
    color: #5f5f5f;
    font-size: 13px;
}

.machine-bundle-config-modal .fieldset-bundle-options > .legend,
.machine-bundle-config-modal .fieldset-bundle-options > br,
.machine-bundle-config-modal .fieldset-bundle-options > script {
    display: none;
}

.machine-bundle-config-modal .fieldset-bundle-options > .field.option {
    display: none;
}

.new-machine-pdp.catalog-product-view .machine-bundle-config-modal .fieldset-bundle-options > .field.option .label {
    font-weight: 600;
    font-size: 16px;
    margin: 0px 0px 10px;
}

.machine-bundle-config-modal .machine-bundle-native-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.machine-bundle-config-modal select.machine-bundle-native-hidden {
    display: none !important;
}

.machine-bundle-config-modal .field.qty.qty-holder,
.machine-bundle-config-modal .option-tier-prices,
.machine-bundle-config-modal .validation-advice,
.machine-bundle-config-modal [id^='validation-message-box'] {
    display: none !important;
}

.machine-bundle-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.machine-bundle-choice-card.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.machine-bundle-config-modal__actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 20px 0px;
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 1;
}

.machine-bundle-config-modal__btn.js-next,
.machine-bundle-config-modal__btn.js-submit {
    margin-left: auto;
}

.machine-bundle-config-modal__btn {
    border-radius: 24px;
    padding: 8px 20px;
    min-width: 120px;
    cursor: pointer;
}

.machine-bundle-config-modal__btn--secondary {
    background: #fff;
    color: #257a57;
    border: 1px solid #257a57;
}

.machine-bundle-config-modal__btn--primary {
    background: #257a57;
    color: #fff;
    border: 1px solid #257a57;
}
.machine-bundle-config-modal__btn:hover,
.machine-bundle-config-modal__btn:focus,
.machine-bundle-config-modal__btn:active {
    background-color: #1d5f43;
    border: 1px solid #1d5f43;
}
/* New machine PDP bundle offer card */
body.new-machine-pdp .growisto-machine-bundle-offer-list {
    display: block;
    width: 100%;
    clear: both;
}

body.new-machine-pdp .growisto-machine-bundle-offer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 0;
    padding: 16px;
    border: 1px solid #c5c5c5;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    text-transform: none;
    margin-bottom: 16px;
}

body.new-machine-pdp .machine-price-options .product-options-bottom {
    flex-wrap: wrap;
}

body.new-machine-pdp .growisto-machine-bundle-offer__name {
    letter-spacing: 0.25px;
    color: #17171a;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 600;
    flex: 1;
}

body.new-machine-pdp .growisto-machine-bundle-offer__prices {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    white-space: nowrap;
    letter-spacing: normal;
}

body.new-machine-pdp .growisto-machine-bundle-offer__labels {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: #17171a;
    line-height: 1;
    font-size: 12px;
    font-weight: 400;
}

body.new-machine-pdp .growisto-machine-bundle-offer__amounts {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    line-height: 22px;
}

body.new-machine-pdp .growisto-machine-bundle-offer__regular {
    color: #6f6f70;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 400;
}

body.new-machine-pdp .growisto-machine-bundle-offer__final {
    font-size: 16px;
    color: #257A57;
    font-weight: 600;
}

.nested.options-list {
    border: 1px solid #17171a !important;
    padding: 10px;
    border-radius: 8px !important;
    display: inline-block;
    letter-spacing: 0.25px;
    color: #17171a;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    text-align: end;
    background-color: #f3eee6 !important;
}

.machine-bundle-choice-card {
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    margin: 0px !important;
    background: #fff;
    padding: 6px;
    text-transform: unset;
    line-height: 1;
    display: flex;
    flex-direction: column;
}
.machine-bundle-choice-card:hover,
.machine-bundle-choice-card:active,
.machine-bundle-choice-card:focus,
.machine-bundle-choice-card.is-selected {
    background-color: #f3eee6 !important;
    border: 1px solid #17171a !important;
}
.machine-bundle-choice-card__img {
    padding-top: 100%;
    position: relative;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}
.machine-bundle-choice-card__img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.machine-bundle-choice-card__label {
    letter-spacing: 0.25px;
    color: #17171a;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    display: block;
}
.fieldset-bundle-options .field.option {
    margin-bottom: 0px;
}
.machine-bundle-config-modal__close {
    position: absolute;
    top: 20px;
    right: 0;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    line-height: 1;
    font-size: 0;
    padding: 0;
}
button.machine-bundle-config-modal__close::after {
    content: '\e616';
    font-family: 'icons-blank-theme';
    font-size: 37px;
    font-weight: 400;
    line-height: 1;
    display: inline-block;
}

@media only screen and (max-width: 768px) {
    .machine-bundle-config-modal__close {
        top: 15px;
        right: 0;
    }
    button.machine-bundle-config-modal__close::after {
        font-size: 28px;
    }
    .machine-bundle-choice-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }
    .machine-bundle-config-modal__dialog {
        padding: 0px 16px;
    }
    .machine-bundle-config-modal__header {
        padding: 16px 0px 10px;
    }
    .machine-bundle-config-modal__actions {
        padding: 16px 0px;
    }
    .machine-bundle-choice-card__label {
        font-size: 12px;
    }
    .machine-bundle-config-modal__actions {
        position: sticky;
        bottom: 0px;
        background: #fff;
        padding-bottom: 16px;
    }
    .machine-bundle-config-modal__btn {
        padding: 6px 20px;
        min-width: 100px;
        font-size: 13px;
    }
}