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

.cart-page {
    min-height: 100vh;
    padding: 2rem 0;
    background: var(--bg-secondary);
}

/* Cart Header */
.cart-header {
    margin-bottom: 2rem;
}

.cart-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cart-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.cart-count,
.cart-total {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-total {
    color: var(--primary-color);
}

/* Cart Content */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 1200px) {
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .cart-summary-section {
        order: -1; /* Show summary first on mobile */
    }
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    min-height: 300px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto 120px auto;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
}

@media (max-width: 1200px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }
    
    .item-quantity,
    .item-total,
    .item-actions {
        grid-column: 2;
    }
    
    .item-quantity {
        justify-self: start;
        margin-top: 0.5rem;
    }
    
    .item-total {
        text-align: left;
        margin-top: 0.5rem;
    }
    
    .item-actions {
        justify-self: end;
        margin-top: 0.5rem;
    }
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

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

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.item-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

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

.item-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.price-current {
    font-size: 1rem;
    font-weight: 700;
    color: #dc2626;
}

.price-original {
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    font-size: 1.125rem;
    font-weight: 600;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.item-quantity input {
    width: 50px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.item-total {
    text-align: right;
}

.item-total strong {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.item-actions .btn-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.item-actions .btn-remove:hover {
    background: #dc2626;
    color: white;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-cart h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

/* Cart Summary */
.cart-summary-section {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.cart-summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

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

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.summary-row.total {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.btn-checkout {
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    padding: 0.875rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .cart-summary-section {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding: 1rem 0;
    }
    
    .cart-header h1 {
        font-size: 1.75rem;
    }
    
    .cart-summary-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }
    
    .item-quantity,
    .item-total,
    .item-actions {
        grid-column: 2;
    }
    
    .item-quantity {
        justify-self: start;
        margin-top: 0.5rem;
    }
    
    .item-total {
        text-align: left;
        margin-top: 0.5rem;
    }
    
    .item-actions {
        justify-self: end;
        margin-top: 0.5rem;
    }
}

