/* ===================================
   Cart Page Styles
   =================================== */

.cart-hero {
    background: linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 100%);
    padding: var(--spacing-md) 0;
    text-align: center;
}

.cart-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.cart-hero p {
    color: #666;
}

/* Cart Section */
.cart-section {
    padding: var(--spacing-xl) 0;
    background: var(--color-light);
    min-height: 60vh;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-lg);
}

/* Cart Items */
.cart-items {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #eee;
}

.cart-header h2 {
    font-size: 1.5rem;
}

.btn-clear-cart {
    padding: 0.6rem 1.2rem;
    background: white;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-base);
}

.btn-clear-cart:hover {
    background: #e74c3c;
    color: white;
}

/* Cart Item */
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid #eee;
    transition: var(--transition-base);
}

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

.cart-item:hover {
    background: #f8f9fa;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.cart-item-details h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.cart-item-category {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-color {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-sm);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qty-btn {
    width: 35px;
    height: 35px;
    background: white;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.qty-input {
    width: 50px;
    height: 35px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-weight: 600;
}

.btn-remove-item {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.cart-summary h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}

.summary-row span:first-child {
    color: #666;
}

.summary-row span:last-child {
    font-weight: 600;
}

.summary-divider {
    height: 1px;
    background: #eee;
    margin: var(--spacing-md) 0;
}

.summary-total {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
}

.summary-total span {
    color: var(--color-dark);
    font-weight: 800;
}

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

.cart-summary .btn {
    width: 100%;
    margin-bottom: var(--spacing-sm);
}

.summary-notice {
    display: flex;
    gap: 0.5rem;
    background: #e8f5e9;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
}

.summary-notice i {
    color: #27ae60;
    margin-top: 0.2rem;
}

.summary-notice p {
    font-size: 0.85rem;
    color: #2d5016;
    line-height: 1.5;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: var(--spacing-xl);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.empty-cart i {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: var(--spacing-md);
}

.empty-cart h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
}

.empty-cart p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

/* Responsive */
@media (max-width: 968px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
}

@media (max-width: 580px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: var(--spacing-sm);
    }
    
    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .cart-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }
}