﻿/* ==========================================================================
   cart.css  -  cart.aspx only
   ========================================================================== */

.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.cart-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-panel-head {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr auto;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.cart-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}

    .cart-row:last-child {
        border-bottom: none;
    }

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

    .cart-item-info img {
        width: 72px;
        height: 88px;
        object-fit: cover;
        border-radius: var(--radius);
        background: var(--bg-3);
    }

.cart-item-name {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}

.cart-item-size {
    font-size: 12px;
    color: var(--muted);
}

.cart-item-remove {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: var(--muted);
    text-decoration: underline;
}

    .cart-item-remove:hover {
        color: var(--red-primary);
    }

.cart-price, .cart-line-total {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.cart-qty .quantity-selector {
    height: 38px;
}

.cart-qty .qty-btn {
    height: 36px;
    width: 32px;
    font-size: 14px;
}

.cart-qty .quantity-selector input {
    height: 36px;
    width: 40px;
}

.cart-remove-btn {
    color: var(--muted);
    padding: 6px;
}

    .cart-remove-btn:hover {
        color: var(--red-primary);
    }

/* Summary */
.cart-summary {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    position: sticky;
    top: 24px;
}

    .cart-summary h3 {
        font-family: var(--serif);
        font-size: 20px;
        margin-bottom: 20px;
    }

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--ink-2);
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

    .summary-row.total {
        border-bottom: none;
        padding-top: 16px;
        font-size: 17px;
        font-weight: 700;
        color: var(--ink);
    }

.cart-summary .btn {
    width: 100%;
    margin-top: 20px;
}

.cart-note {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: 14px;
    line-height: 1.6;
}

.promo-row {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

    .promo-row input {
        flex: 1;
    }

    .promo-row .btn {
        width: auto;
        margin-top: 0;
        white-space: nowrap;
    }

/* Empty state */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
}

    .cart-empty .empty-icon {
        color: var(--line);
        margin-bottom: 20px;
    }

    .cart-empty h2 {
        font-family: var(--serif);
        font-size: 24px;
        margin-bottom: 10px;
    }

    .cart-empty p {
        color: var(--muted);
        font-size: 14px;
        margin-bottom: 24px;
    }

/* ============ Responsive ============ */
@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-panel-head {
        display: none;
    }

    .cart-row {
        grid-template-columns: 1fr;
        gap: 12px;
        position: relative;
    }

    .cart-remove-btn {
        position: absolute;
        top: 20px;
        right: 0;
    }
}
