/* ======= Pagina Carrello — Design moderno ======= */

/* Titolo pagina */
.cart-page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #333;
}

.cart-page-count {
    font-size: 16px;
    font-weight: 400;
    color: #999;
}

/* ======= Cart Item Card ======= */
.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.cart-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-color: #e0e0e0;
}

/* Immagine */
.cart-item-img {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
}

.cart-item-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.cart-item-img img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 8px;
    background: #fafafa;
}

/* Info prodotto */
.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
}

.cart-item-name a {
    color: #333;
    text-decoration: none;
}

.cart-item-name a:hover {
    color: var(--primary);
}

.cart-item-price {
    font-size: 15px;
    color: var(--primary);
    font-weight: 600;
}

.cart-item-line-total {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
}

/* Quantità */
.cart-item-qty {
    flex-shrink: 0;
    width: 80px;
}

.cart-item-qty input {
    width: 100%;
    text-align: center;
    height: 42px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: border-color 0.2s;
}

.cart-item-qty input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76,145,86,0.1);
}

/* Totale riga */
.cart-item-total {
    flex-shrink: 0;
    width: 100px;
    text-align: right;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

/* Rimuovi */
.cart-item-remove {
    flex-shrink: 0;
}

.cart-item-remove button {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-item-remove button:hover {
    background: rgba(220,53,69,0.08);
    color: #dc3545;
}

/* ======= Summary Card ======= */
.cart-summary-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 28px;
    position: sticky;
    top: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.cart-summary-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: #666;
}

.cart-summary-row span:last-child {
    font-weight: 600;
    color: #333;
}

.cart-summary-total {
    border-top: 2px solid #f0f0f0;
    margin-top: 8px;
    padding-top: 16px !important;
    font-size: 20px !important;
}

.cart-summary-total span {
    font-weight: 700 !important;
    color: #333 !important;
}

.cart-summary-total span:last-child {
    color: var(--primary) !important;
}

/* Coupon */
.cart-coupon-active {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}

.cart-coupon-active .la-tag { color: var(--primary); }

.cart-coupon-remove {
    font-size: 12px;
    color: #dc3545;
    text-decoration: none;
    display: inline-block;
    margin-top: 4px;
}

.cart-coupon-remove:hover { text-decoration: underline; }

.cart-coupon-input {
    padding: 16px 0 12px;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}

.cart-coupon-input label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    display: block;
}

.cart-coupon-form {
    display: flex;
    gap: 8px;
}

.cart-coupon-form input {
    flex: 1;
    font-size: 14px;
    text-transform: uppercase;
}

.cart-coupon-form .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.cart-summary-card .cart-shipping-msg {
    margin: 16px 0;
    padding: 10px 14px;
    background: var(--primary-soft);
    border-radius: 8px;
    border-top: none;
}

.cart-checkout-btn {
    margin-top: 16px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

/* ======= Empty State ======= */
.cart-empty-state {
    text-align: center;
    padding: 80px 20px;
}

.cart-empty-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.cart-empty-icon i {
    font-size: 48px;
    color: var(--primary);
}

.cart-empty-state h2 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* ======= Responsive ======= */
@media (max-width: 991px) {
    .cart-summary-card {
        position: static;
        margin-top: 24px;
    }
}

@media (max-width: 767px) {
    .cart-item {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px;
    }

    .cart-item-img {
        width: 70px;
        height: 70px;
    }

    .cart-item-img img {
        width: 70px;
        height: 70px;
    }

    .cart-item-info {
        flex: 1 1 calc(100% - 90px);
    }

    .cart-item-qty {
        width: 60px;
    }

    .cart-item-total {
        width: auto;
        flex: 1;
    }
}

/* Divider nel riepilogo */
.cart-summary-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

.cart-summary-iva {
    font-size: 12px !important;
    color: #999 !important;
    font-style: italic;
}

.cart-summary-iva span {
    color: #999 !important;
    font-weight: 400 !important;
}
