﻿.cart-page {
    margin-bottom: 30px;
}

.cart-header {
    background: linear-gradient(135deg, var(--avh-green) 0%, var(--avh-green-dark) 100%);
    color: #fff;
    border-radius: var(--avh-radius-lg);
    padding: 24px 28px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 12px 32px rgba(20, 139, 116, 0.28);
}

.cart-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .cart-header-icon svg {
        width: 28px;
        height: 28px;
        stroke: #fff;
        fill: none;
    }

.cart-header-text h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.cart-header-text p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.cart-empty {
    background: var(--avh-bg-soft);
    border: 1px dashed var(--avh-border);
    border-radius: var(--avh-radius-lg);
    padding: 60px 24px;
    text-align: center;
}

.cart-empty-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--avh-green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--avh-green);
}

    .cart-empty-icon svg {
        width: 44px;
        height: 44px;
    }

.cart-empty h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--avh-ink);
    margin: 0 0 10px;
}

.cart-empty p {
    color: var(--avh-muted);
    font-size: 14.5px;
    line-height: 1.9;
    max-width: 460px;
    margin: 0 auto 20px;
}

.cart-invoice {
    background: #fff;
    border: 1px solid var(--avh-border);
    border-radius: var(--avh-radius-lg);
    overflow: hidden;
    box-shadow: var(--avh-shadow-sm);
}

.cart-invoice-head,
.cart-invoice-row {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.1fr) 48px;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
}

.cart-invoice-head {
    background: var(--avh-green-light);
    color: var(--avh-ink);
    font-weight: 800;
    font-size: 13.5px;
    border-bottom: 1px solid var(--avh-border);
}

.cart-invoice-row {
    border-bottom: 1px solid var(--avh-border);
    transition: background var(--avh-transition);
}

    .cart-invoice-row:hover {
        background: var(--avh-bg-soft);
    }

    .cart-invoice-row:last-of-type {
        border-bottom: none;
    }

.cart-cell {
    min-width: 0;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cart-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    border: 1px solid var(--avh-border);
    background: var(--avh-bg-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
    cursor: pointer;
    transition: border-color var(--avh-transition), transform var(--avh-transition);
}

    .cart-thumb:hover {
        border-color: var(--avh-green);
        transform: scale(1.04);
    }

    .cart-thumb img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }

.cart-info {
    min-width: 0;
}

    .cart-info h3 {
        margin: 0 0 4px;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.5;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

        .cart-info h3 a {
            color: var(--avh-ink);
            text-decoration: none;
        }

            .cart-info h3 a:hover {
                color: var(--avh-green);
            }

.cart-discount-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: #7a2416;
    background: linear-gradient(135deg, #ffd9cc, #ffbfa8);
    border: 1px solid #ffc7b2;
    border-radius: 999px;
    padding: 2px 10px;
}

.cart-price-final {
    font-weight: 800;
    font-size: 14px;
    color: #b64535;
}

.cart-price-old {
    display: block;
    color: var(--avh-muted);
    font-size: 12px;
    margin-top: 2px;
}

.cart-price-call {
    font-weight: 700;
    font-size: 13px;
    color: #c98a00;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cart-qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--avh-border);
    background: #fff;
    color: var(--avh-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--avh-transition), color var(--avh-transition), border-color var(--avh-transition);
    padding: 0;
}

    .cart-qty-btn:hover {
        background: var(--avh-green);
        color: #fff;
        border-color: var(--avh-green);
    }

.cart-qty-input {
    width: 54px;
    height: 30px;
    padding: 0 6px;
    border: 1px solid var(--avh-border);
    border-radius: 8px;
    text-align: center;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--avh-ink);
    background: #fff;
    -moz-appearance: textfield;
}

    .cart-qty-input::-webkit-outer-spin-button,
    .cart-qty-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.cart-subtotal-value {
    font-weight: 800;
    color: var(--avh-green-dark);
    font-size: 14px;
}

.cart-actions {
    display: flex;
    justify-content: center;
}

.cart-remove-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #e74c3c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.22);
    transition: background var(--avh-transition), color var(--avh-transition), transform var(--avh-transition);
    padding: 0;
}

    .cart-remove-btn svg {
        width: 15px;
        height: 15px;
        display: block;
        stroke: currentColor;
        fill: none;
        pointer-events: none;
    }

    .cart-remove-btn:hover {
        background: #e74c3c;
        color: #fff;
        transform: scale(1.08);
    }

    .cart-remove-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.cart-invoice-foot {
    background: var(--avh-bg-soft);
    border-top: 1px solid var(--avh-border);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.cart-total-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cart-total-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--avh-muted);
}

.cart-total-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--avh-green-dark);
}

.cart-foot-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 767.98px) {
    .cart-invoice-head {
        display: none;
    }

    .cart-invoice-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 14px;
    }

    .cart-cell {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

        .cart-cell::before {
            content: attr(data-label);
            font-size: 12.5px;
            font-weight: 700;
            color: var(--avh-muted);
        }

    .cart-product {
        justify-content: flex-start;
    }

        .cart-product::before {
            display: none;
        }

    .cart-actions {
        justify-content: flex-end;
    }

        .cart-actions::before {
            display: none;
        }

    .cart-invoice-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-foot-actions {
        justify-content: space-between;
    }
}
