/* ============================================
   CART PAGE
   سبد خرید
   ============================================ */

.cart-page {
    max-width: 1200px;
    margin: 0 auto;
}

.cart-page .page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

.cart-items {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

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

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

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

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

.item-name {
    font-weight: 600;
    font-size: 15px;
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
}

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

.item-price {
    color: var(--text-secondary);
    font-size: 14px;
}

.item-quantity .qty-control {
    display: inline-flex;
}

.item-total {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-color);
    min-width: 120px;
    text-align: left;
}

.remove-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition);
}

.remove-btn:hover {
    background: #ffebee;
    color: var(--danger-color);
}

.cart-summary {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.cart-summary h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-row.total {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 16px 0;
    margin: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.shipping-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.cart-summary .btn {
    margin-bottom: 10px;
}

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

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
    }
    
    .item-image {
        width: 80px;
        height: 80px;
        grid-row: span 2;
    }
    
    .item-quantity,
    .item-total,
    .remove-btn {
        grid-column: 2;
    }
    
    .item-total {
        text-align: right;
    }
}