/**
 * 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;
}

@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;
    }

}