/* ==================== CART PAGE ==================== */

.cart-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.cart-empty i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: block;
}

.cart-empty p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: flex-start;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.cart-item:hover {
    border-color: var(--border-hover);
}

/* Item Image */
.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image i {
    font-size: 2rem;
    color: var(--text-muted);
}

/* Item Details */
.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
}

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

.cart-item-variant {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 500;
}

.cart-item-sku {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Item Price */
.cart-item-price {
    font-size: 1rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: var(--color-primary);
    color: #fff;
}

.qty-value {
    width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Item Total */
.cart-item-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

/* Remove Button */
.cart-item-remove {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.cart-item-remove:hover {
    color: var(--color-danger, #ef4444);
    background: rgba(239, 68, 68, 0.1);
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.cart-subtotal {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-shipping {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.cart-summary hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

.cart-checkout-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.cart-continue-btn {
    width: 100%;
    justify-content: center;
}

/* Cart item removal animation */
.cart-item.removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 700px) {
    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 0.75rem;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
        grid-row: span 2;
    }

    .cart-item-details {
        grid-column: 2;
    }

    .cart-item-price {
        display: none;
    }

    .cart-item-quantity,
    .cart-item-total,
    .cart-item-remove {
        grid-column: 2;
    }

    .cart-item-quantity {
        justify-self: start;
    }

    .cart-item-total {
        justify-self: start;
    }

    .cart-item-remove {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
    }

    .cart-item {
        position: relative;
    }
}
