/* ============================================
   SV Cart Modal — Prodotto aggiunto al carrello
   ============================================ */

#sv-cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#sv-cart-modal {
    background: #fff;
    border-radius: 10px;
    max-width: 560px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: svModalIn 0.25s ease;
}

@keyframes svModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Close button */
#sv-cart-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

#sv-cart-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Header */
.sv-cart-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px 16px;
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.sv-cart-modal-header svg {
    flex-shrink: 0;
}

/* Body */
.sv-cart-modal-body {
    display: flex;
    gap: 20px;
    padding: 0 24px 20px;
}

/* Product */
.sv-cart-modal-product {
    display: flex;
    gap: 14px;
    flex: 1;
}

#sv-cm-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    background: #f5f5f5;
    flex-shrink: 0;
}

.sv-cm-info {
    min-width: 0;
}

.sv-cm-name {
    font-weight: 600;
    font-size: 15px;
    color: #614b36;
    margin-bottom: 4px;
}

#sv-cm-attributes {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.4;
}

#sv-cm-price {
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

#sv-cm-price del {
    color: #999;
    font-size: 13px;
}

#sv-cm-price ins {
    text-decoration: none;
    font-weight: 600;
}

#sv-cm-qty {
    font-size: 13px;
    color: #888;
}

/* Totals */
.sv-cart-modal-totals {
    flex-shrink: 0;
    min-width: 180px;
    font-size: 14px;
}

#sv-cm-count {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.sv-cm-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    color: #555;
}

.sv-cart-modal-totals hr {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 8px 0;
}

.sv-cm-total {
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

/* Actions */
.sv-cart-modal-actions {
    display: flex;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid #eee;
}

.sv-cm-btn-secondary {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
    transition: all 0.15s;
    text-align: center;
}

.sv-cm-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.sv-cm-btn-primary {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    background: #614b36;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
    text-align: center;
}

.sv-cm-btn-primary:hover {
    background: #4a3828;
    color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
    #sv-cart-modal {
        max-width: 100%;
        margin: 10px;
    }

    .sv-cart-modal-body {
        flex-direction: column;
        gap: 16px;
    }

    .sv-cart-modal-totals {
        min-width: auto;
    }

    .sv-cart-modal-actions {
        flex-direction: column;
    }
}

/* Fix: nasconde il suffisso prezzo nel modal */
#sv-cm-price .custom-price-suffix,
#sv-cm-price .ff {
    display: none;
}
