/* Tenute Oliveto — conferma aggiunta al carrello */
.to-cart-added-modal .modal-dialog {
    max-width: 640px;
}

.to-cart-added-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(24, 45, 31, .20);
}

.to-cart-added-modal .to-cart-added-head {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 24px 26px 20px;
    border-bottom: 1px solid rgba(35, 69, 46, .10);
    background: linear-gradient(135deg, #f8faf6 0%, #eef4eb 100%);
}

.to-cart-added-status {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2d6038;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(45, 96, 56, .18);
}

.to-cart-added-heading span,
.to-cart-added-kicker {
    display: block;
    color: #65806a;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.to-cart-added-heading h2 {
    margin: 2px 0 2px;
    color: #203c29;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.12;
}

.to-cart-added-heading p {
    margin: 0;
    color: #68736d;
    font-size: .92rem;
}

.to-cart-added-modal .btn-close {
    align-self: start;
    margin: 2px 0 0;
    opacity: .55;
}

.to-cart-added-modal .modal-body {
    padding: 24px 26px 26px;
}

.to-cart-added-product {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.to-cart-added-image {
    display: flex;
    width: 112px;
    height: 112px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
    border: 1px solid rgba(35, 69, 46, .10);
    border-radius: 18px;
    background: #fafbf9;
}

.to-cart-added-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.to-cart-added-image-placeholder {
    color: #75907b;
    font-size: 2rem;
}

.to-cart-added-product-info {
    min-width: 0;
}

.to-cart-added-product-info h3 {
    margin: 4px 0 8px;
    color: #202a23;
    font-size: 1.15rem;
    font-weight: 750;
    line-height: 1.3;
}

.to-cart-added-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    min-height: 22px;
    color: #707a74;
    font-size: .88rem;
}

.to-cart-added-meta span:empty {
    display: none;
}

.to-cart-added-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid rgba(35, 69, 46, .09);
    color: #68736d;
    font-size: .88rem;
}

.to-cart-added-price-row strong {
    color: #203c29;
    font-size: 1.08rem;
}

.to-cart-added-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid rgba(35, 69, 46, .09);
    border-radius: 16px;
    background: rgba(35, 69, 46, .09);
}

.to-cart-added-summary > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: #f7f9f5;
}

.to-cart-added-summary span {
    color: #77817b;
    font-size: .78rem;
}

.to-cart-added-summary strong {
    color: #203c29;
    font-size: 1.05rem;
    font-weight: 800;
}

.to-cart-added-actions {
    display: grid;
    gap: 9px;
    margin-top: 20px;
}

.to-cart-added-primary,
.to-cart-added-secondary {
    display: inline-flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 750;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.to-cart-added-primary {
    border: 0;
    background: linear-gradient(90deg, #244c2f 0%, #346d3c 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(36, 76, 47, .16);
}

.to-cart-added-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(36, 76, 47, .20);
}

.to-cart-added-secondary {
    border: 1px solid rgba(35, 69, 46, .20);
    background: #fff;
    color: #425148;
}

.to-cart-added-secondary:hover {
    background: #f7f9f5;
}

.to-cart-added-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px 0;
    color: #50655a;
    font-size: .88rem;
    font-weight: 650;
    text-decoration: none;
}

.to-cart-added-checkout:hover {
    color: #244c2f;
}

@media (max-width: 575.98px) {
    .to-cart-added-modal {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .to-cart-added-modal .modal-dialog {
        margin: 10px auto;
        min-height: calc(100% - 20px);
    }

    .to-cart-added-modal .modal-content {
        border-radius: 20px;
    }

    .to-cart-added-modal .to-cart-added-head {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 11px;
        padding: 18px 16px 16px;
    }

    .to-cart-added-status {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .to-cart-added-heading h2 {
        font-size: 1.22rem;
    }

    .to-cart-added-heading p {
        display: none;
    }

    .to-cart-added-modal .modal-body {
        padding: 18px 16px 20px;
    }

    .to-cart-added-product {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 14px;
        align-items: start;
    }

    .to-cart-added-image {
        width: 82px;
        height: 92px;
        padding: 7px;
        border-radius: 14px;
    }

    .to-cart-added-product-info h3 {
        margin-top: 3px;
        font-size: 1rem;
    }

    .to-cart-added-meta {
        display: grid;
        gap: 2px;
        font-size: .8rem;
    }

    .to-cart-added-price-row {
        margin-top: 8px;
        padding-top: 8px;
    }

    .to-cart-added-summary {
        margin-top: 16px;
    }

    .to-cart-added-summary > div {
        padding: 11px 12px;
    }

    .to-cart-added-summary span {
        font-size: .7rem;
    }

    .to-cart-added-summary strong {
        font-size: .95rem;
    }

    .to-cart-added-actions {
        margin-top: 16px;
    }

    .to-cart-added-primary,
    .to-cart-added-secondary {
        min-height: 48px;
        border-radius: 13px;
    }
}

@media (max-width: 359.98px) {
    .to-cart-added-summary {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   FIX MOBILE MODALE CARRELLO
   - evita che il centraggio verticale nasconda i pulsanti
   - limita la modale alla viewport reale del dispositivo
   - rende scrollabile solo il contenuto interno
   ========================================================= */
@media (max-width: 767.98px) {
    .to-cart-added-modal {
        padding: 0 8px !important;
        overflow-y: auto;
    }

    .to-cart-added-modal .modal-dialog {
        width: auto;
        margin: 8px auto;
        min-height: 0 !important;
        height: auto !important;
        max-height: calc(100dvh - 16px);
        align-items: flex-start !important;
    }

    .to-cart-added-modal .modal-content {
        width: 100%;
        max-height: calc(100dvh - 16px);
        overflow: hidden;
    }

    .to-cart-added-modal .modal-body {
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .to-cart-added-modal .to-cart-added-head {
        flex: 0 0 auto;
    }
}

/* Fallback per browser che non supportano ancora dvh. */
@supports not (height: 100dvh) {
    @media (max-width: 767.98px) {
        .to-cart-added-modal .modal-dialog,
        .to-cart-added-modal .modal-content {
            max-height: calc(100vh - 16px);
        }
    }
}

